uniq-number
v1.2.0
Published
Generate unique number with Javascript generators
Downloads
26
Maintainers
Readme
Generate unique numbers with javascript generators.
- Small 272 bytes (minified and gzipped).
- No dependencies
- Tested
Example
import { getUniq } from 'uniq-number'
console.log( getUniq() )
console.log( getUniq() )
console.log( getUniq() )
// 0
// 1
// 2
const getUniqueNumberFromTen = getUniq(10)
console.log( getUniqueNumberFromTen() )
console.log( getUniqueNumberFromTen() )
console.log( getUniqueNumberFromTen() )
// 10
// 11
// 12
Install
$ npm install --save uniq-number