Create unique IDs for slugs, passwords, and more with ease. Our package allows you to customize string length, include numbers, and special characters to fit your needs.
This project requires NodeJS (version 8 or later), file-type Module and NPM. Node and NPM are really easy to install. To make sure you have them available on your machine, try running the following command.
$ npm -v && node -v
6.4.1
v8.16.0
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
BEFORE YOU INSTALL: please read the prerequisites
Start with cloning this repo on your local machine:
$ git clone https://github.com/sauraverse/npm-package.git
$ cd npm-package
To install and set up the library, run:
$ npm install -S cst-unique-id
url
Type | Default value(40characters unique str) |
---|---|
string | 'E!wcDV%@Sh4Dd@KQm_5!?vNoQ@CjJUO@i3IuwB_%' |
If present, the request will be performed as soon as the function is called
Example:
import genId from "cst-unique-id"
console.log(genId()); // Generates a 40-character password with numbers and special characters
console.log(genId(15)); // Generates a 15-character password with numbers and special characters
console.log(genId(15, false)); // Generates a 15-character password without numbers, but with special characters
console.log(genId(15, false, false)); // Generates a 15-character password without numbers and without special characters
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Add your changes:
git add .
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request 😎
- Saurav K. - Portfolio - sauraverse