short-unique-string
v1.0.0
Published
Generate short unique id string locally.
Downloads
8
Maintainers
Readme
short-unique-string
Generate short unique id string locally. Generate
7921
unique id string with only length <=2
.
Usage
npm i --save short-unique-string
var generator = require('short-unique-string');
var uniqueId = generator({
number: true,
symbol: true
})
uniqueId(); // '0'
// ...
uniqueId(); // 'aY'
Only one API generator(opts)
, opts is the unique parameter which is a pure object:
number
: contain number string, default isfalse
.symbol
: contain symbol string, default isfalse
.
License
MIT@hustcc.