utc-random
v1.0.1
Published
Non-standard UUID generator
Downloads
1
Readme
Non-standard UUID generator
The UUIDs are 128 bits and are represented as 32 character hex strings. The first 14 hex characters are the number of microseconds since the Unix epoch, and the remaining 18 hex characters are random.
Usage
const utcr = require('utc-random');
// Call it directly
utcr((err, id) => {
if (err) throw err;
console.log(id);
});
// Or call the generate function
utcr.generate((err, id) => {
if (err) throw err;
console.log(id);
});