Created
May 26, 2017 10:12
-
-
Save ElMatella/302ac884d33ab0da2d8854c261120bbb to your computer and use it in GitHub Desktop.
This file contains 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
let randomstring = require('randomstring') | |
let found = false | |
let random; | |
while (! found) { | |
random = randomstring.generate({ | |
length: 14, | |
charset: 'alphanumeric' | |
}) | |
process.stdout.clearLine(); | |
process.stdout.cursorTo(0); | |
process.stdout.write(random) | |
if (random === 'xxxxxxxxxxxxxx') { | |
found = true | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment