Skip to content

Instantly share code, notes, and snippets.

@fvdm
Last active January 14, 2017 15:26
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 fvdm/16ab235bfa54ef84c192 to your computer and use it in GitHub Desktop.
Save fvdm/16ab235bfa54ef84c192 to your computer and use it in GitHub Desktop.
function busy (ms) {
var arr = '|/―\\', i = 0;
setInterval (function() {
i = !arr[i] ? 0 : i;
process.stdout.write ('\r' + arr[i] + ' ');
i++;
}, ms);
}
busy (90);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment