generate unique ids of any length
JavaScript HTML Makefile
Latest commit 8913bbf Dec 22, 2015 @matthewmueller Remove component :'(
Permalink
Failed to load latest commit information.
bin added uid executable Mar 1, 2013
.gitignore Initial commit Nov 24, 2012
History.md Release 0.0.2 Jul 15, 2013
Makefile Initial commit Nov 24, 2012
Readme.md Remove component :'( Dec 22, 2015
component.json Release 0.0.2 Jul 15, 2013
index.js Update index.js Nov 26, 2012
package.json Release 0.0.2 Jul 15, 2013
test.html Initial commit Nov 24, 2012

Readme.md

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