1.0.0 • Published 3 years ago
advanced-id v1.0.0
About
Advanced Id is an easy to use package to generate Ids. It will generate them based on the length and type you provided.
Simple and easy to use.
Table of Contents:
Example Usage
Before you begin, please install the package with:
npm i advanced-id
Or with yarn:
yarn add advanced-id
Next, you need to import the package:
const Id = require('advanced-id');
Or:
import Id from 'advanced-id';
After that, you're almost ready to go.
Here's some examples on how to use it:
const Id = require('advanced-id');
const generator = new Id;
console.log(generator.generate({type: "all", length: 10})) //--> aDPmGmx)tj
console.log(generator.generate({type: "string", length: 15})) //--> tFxTRUlaFUTDeSv
console.log(generator.generate({type: "int", length: 15})) //--> 089627231411342
console.log(generator.generate({type: "symbol", length: 15})) //--> @@^(+)&)%88@#=@
Types
Type | Description |
---|---|
all | Includes letters, integers, and symbols all into one id. |
string | Only includes letters into the id. |
int | Only includes integers into the id. |
symbol | Only includes symbols into the id. |
1.0.0
3 years ago