Home

Awesome

uniqueid

NPM version NPM downloads Build status Test coverage

Generate sequential IDs, with optional prefix or suffix.

Installation

npm i uniqueid --save-dev

Usage

var uniqueid = require('uniqueid')
var first = uniqueid('prefix')
var second = uniqueid(null, 'suffix')

console.log(first()) //=> "prefix0"
console.log(second()) //=> "0suffix"
console.log(first()) //=> "prefix1"
console.log(second()) //=> "1suffix"

Typings

Includes a TypeScript definition.

Contributing

npm install
npm test

License

Copyright (c) 2014 Jon Schlinkert, contributors.

Released under the MIT license