Last active
February 16, 2017 11:10
-
-
Save kutyel/fe0c2f0f0fdd414bf0465bf0974de44d to your computer and use it in GitHub Desktop.
Output to the terminal an underground-like message!
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
#!/usr/bin/env node | |
const msg = process.argv.slice(2).join(' ').toUpperCase().concat(' '.repeat(20)) | |
let index = -1 | |
setInterval(() => { | |
index++ | |
process.stdout.write(msg.slice(index).concat(msg.slice(0, index))) | |
process.stdout.cursorTo(0) | |
index >= msg.length - 1 && (index = -1) | |
}, 300) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment