@owenm/generate_id
v2.0.0
Published
Generate a random alphanumeric ID of arbitrary length
Downloads
2
Readme
generate_id
Generate a random unique string of arbitrary length
Can be used for anything, form unique URLs to user IDs, to cryptographic signatures
Install
$ npm install generate_id
Usage
var generateID = require('generate_id');
/* Defaults to length of 6 */
generateID();
// => "gIkoM1"
/* Can be passed any length to make the ID */
generateID(12);
// => "oHmwpz5n6hxm"