UNPKG

shortid32

Version:

Amazingly short non-sequential human-friendly unique id generator.

11 lines (7 loc) 179 B
'use strict'; var crypto = require('crypto'); var randomBytes = crypto.randomBytes; function randomByte() { return randomBytes(1)[0] & 0x10; } module.exports = randomByte;