1.0.7 • Published 6 years ago

@spider_webs/genid v1.0.7

Weekly downloads
-
License
MIT
Repository
github
Last release
6 years ago

genid

genid is an id generator.

Installation

npm install @spider_webs/genid

this will add the module as your dependency.

Usage

To use it is very simple, just import the package

const genid = require("@spider_webs/genid");

Then by default genid will create a random id by the format "nnnnnllnn_lll_nlnl_nll" 'n' stands for number and 'l' stands for letter. The only separator available at the moment is by using underscore "_".

To create your custom id format, just simply add the format as the parameter. For instance, to create a random id with five numbers I can pass 'nnnnn' to the parameter as an argument to generate five random numbers.

console.log(genid("nnnnn"));

and it should give a random number similar to this 23749.

Contact

add me on facebook contact me on email check me on github

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago