Created
May 10, 2016 16:05
-
-
Save agreen757/52f7ea65770ac49c85baeb9da650bf4d to your computer and use it in GitHub Desktop.
little command line spinner for Node
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
var spinner = { | |
count: 0, | |
init: function () { | |
this.count += 1; | |
switch (this.count) { | |
case 1: | |
return '|\r'; | |
case 2: | |
return '/\r'; | |
case 3: | |
return '-\r'; | |
case 4: | |
return "'\'\r"; | |
case 5: | |
this.count = 0; | |
return '|\r'; | |
default: | |
} | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment