Skip to content

Instantly share code, notes, and snippets.

@awwright
Forked from apipkin/gist:5923314
Last active December 19, 2015 08:09
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 awwright/5923322 to your computer and use it in GitHub Desktop.
Save awwright/5923322 to your computer and use it in GitHub Desktop.
spinner = {
fn: function () {
var char = spinner.chars[++spinner.offset%spinner.chars.length];
process.stdout.write('\x1B[s' + char + '\x1B[u');
},
chars: ['—', '\\', '|', '/'],
offset: 0
timer: null,
speed: 100
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment