Last active
April 20, 2017 11:34
-
-
Save jbutko/52e08e02b177d1f3af57edd05082bbca to your computer and use it in GitHub Desktop.
Generate random string in node
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
const crypto = require('crypto'); | |
const id = crypto.randomBytes(24).toString('hex'); | |
// via http://stackoverflow.com/questions/23327010/how-to-generate-unique-id-with-node-js#answer-40191779 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment