Skip to content

Instantly share code, notes, and snippets.

@agreen757
Created May 10, 2016 16:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save agreen757/52f7ea65770ac49c85baeb9da650bf4d to your computer and use it in GitHub Desktop.
Save agreen757/52f7ea65770ac49c85baeb9da650bf4d to your computer and use it in GitHub Desktop.
little command line spinner for Node
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