2.4.1 • Published 3 years ago

id-a-generator v2.4.1

Weekly downloads
14
License
MIT
Repository
github
Last release
3 years ago

About id-generator

id-generator is a low size package created to generate IDs without much effort.

Installation

using npm : npm install id-a-generator

Usage

first of all import/require it in your code, then use it as following : idGenerator(config) config currently has the following options :
1. length a number value to specify the length of the ID. 2. uppercase needs a boolean value to get the function to use uppercase keyset too. 3. lowercase same as uppercase but is set to true by default. 4. numbers same. 5. prefix add a string to the beginning of the ID. 6. suffix add a string to the ending of the ID. 7. hashes a string or an array of strings. check if the generated hash is already in hashes array and if it's is generate a new one. 8. count the number of hashes you want to generate. returns one string by default.

Example

want a 4 length ID using numbers and lowercase keys?

const idGenerator = require('id-a-generator);
const id = idGenerator({length:4, lowercase:true, numbers:true});

there you go!

2.4.1

3 years ago

2.4.0

3 years ago

2.3.1

3 years ago

2.3.0

3 years ago

2.2.0

4 years ago

2.1.5

4 years ago

2.1.2

4 years ago

2.1.4

4 years ago

2.1.3

4 years ago

2.1.0

4 years ago

2.0.0

4 years ago

1.0.0

4 years ago