1.0.0 • Published 8 years ago

pushid v1.0.0

Weekly downloads
543
License
ISC
Repository
github
Last release
8 years ago

pushid - Lexicographically ordered string IDs

Modelled after https://gist.github.com/mikelehen/3596a30bd69384624c11 from Michael Lehenbauer and an explanatory blog post is The 2^120 Ways to Ensure Unique Identifiers.

This is close to what Firebase uses in their push IDs.

Installation

pushid can be installed from npm:

npm install pushid

Synopsis

var pushid = require('pushid')

console.log(pushid())
// -> "-KQ40rgB96epAE7LZH2W"

console.log(pushid())
// -> "-KQ42XiyWauJIUSNJZeg"

Author

Andrew Chilton:

AppsAttic

License

ISC.

(Ends)