jbutko
4/20/2017 - 11:34 AM

Generate random string in node

Generate random string in node

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