uniqueid
Generate sequential IDs, with optional prefix or suffix
Last updated 10 years ago by blakeembrey .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install uniqueid 
SYNC missed versions from official npm registry.

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"
  • 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

Current Tags

  • 1.0.0                                ...           latest (10 years ago)

2 Versions

  • 1.0.0                                ...           10 years ago
  • 0.1.0                                ...           12 years ago
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 0
Dependencies (0)
None
Dev Dependencies (3)
Dependents (2)

Copyright 2013 - present © cnpmjs.org | Home |