Awesome
uniqueid
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"
- prefix Set the prefix for id generation (string, default:
''
) - suffix Set the suffix for id generation (string, default:
''
)
Typings
Includes a TypeScript definition.
Contributing
npm install
npm test
License
Copyright (c) 2014 Jon Schlinkert, contributors.
Released under the MIT license