Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
24 lines (13 sloc) 464 Bytes

uid

Generate unique ids of any length.

Internally this implementation uses Math.random() to remain small, fast and dependency free. However, Math.random() is not actually all that random so if you need a better random number generator, I recommend uid2.

Installation

Using node.js:

$ npm install uid

Examples

 uid(10) => "hbswt489ts"
 uid() => "rhvtfnt" Defaults to 7

License

MIT