Created
October 18, 2016 14:30
-
-
Save loretoparisi/0416efb4e48db3ed10ee78d33bb24339 to your computer and use it in GitHub Desktop.
Cool node.js stdout spinner
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const spinner = [ '⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏' ]; | |
for(var count=0;count<100000;count++) process.stdout.write(" "+spinner[ (count+1)% spinner.length ]+"\033[0G" ); // \033[0G | \r | \x1B[0G |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment