Skip to content

🆎 Generate short unique id string locally, used optimize javascript code.

Notifications You must be signed in to change notification settings

hustcc/short-unique-string

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

short-unique-string

Generate short unique id string locally. Generate 7921 unique id string with only length <= 2.

Build Status Coverage Status npm

Usage

npm i --save short-unique-string

var generator = require('short-unique-string');

var uniqueId = generator({
  number: true,
  symbol: true
})

uniqueId(); // '0'

// ...

uniqueId(); // 'aY'

Only one API generator(opts), opts is the unique parameter which is a pure object:

  • number: contain number string, default is false.
  • symbol: contain symbol string, default is false.

License

MIT@hustcc.

About

🆎 Generate short unique id string locally, used optimize javascript code.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published