Skip to content

Instantly share code, notes, and snippets.

@styopdev
Created July 8, 2016 13:20
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save styopdev/9a3711d0a038b48421bcf84f32161527 to your computer and use it in GitHub Desktop.
Save styopdev/9a3711d0a038b48421bcf84f32161527 to your computer and use it in GitHub Desktop.
Node,js console loading
var startLoader = function () {
(function() {
process.stdout.write('Some text here...' + "\n");
var P = ["\\", "|", "/", "-"];
var x = 0;
return setInterval(function() {
process.stdout.write("\r" + P[x++]);
x &= 3;
}, 250).unref();
})();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment