Guest User

Untitled

a guest
Feb 17th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. const [exePath, scriptPath, lines, repeats, usageNewline] = process.argv;
  2. const log = Array
  3. .apply(null, Array(parseInt(lines)))
  4. .map((v, i) => i)
  5. .join(usageNewline === '1' ? '\n' : '.') + '\n';
  6.  
  7. const main = () => {
  8. setTimeout(main, 0);
  9. for(let i = 0; i < repeats; i++) {
  10. process.stdout.write(log);
  11. }
  12. }
  13.  
  14. setImmediate(main);
Add Comment
Please, Sign In to add comment