Created
July 8, 2016 13:20
-
-
Save styopdev/9a3711d0a038b48421bcf84f32161527 to your computer and use it in GitHub Desktop.
Node,js console loading
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 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