Skip to content

domdoescode/gen-id

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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()

About

Short non-sequential unique id generator in a user-specified format

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published