gen-id

0.1.1 • Public • Published

GenID Build Status

NPM

var genId = require('gen-id')('nnnnnnnc')
  , orderId = genId.generate()

console.log(orderId)

Initial available formats:

  • n - numeric [0-9]
  • a - alphabetical [a-z]
  • A - alphabetical (case inclusive) [a-zA-Z]
  • h - hexadecimal [0-9a-f]
  • x - alpha-numeric [0-9a-z]
  • X - alpha-numeric (case inclusive) [0-9a-zA-Z]
  • c - checksum

You can change the format at any point by using genId.setFormat()

Readme

Keywords

none

Package Sidebar

Install

npm i gen-id

Weekly Downloads

39

Version

0.1.1

License

BSD

Last publish

Collaborators

  • domudall