uniquevalues
Generate random strings and numbers from from strings or group of numbers. Good for generating unique ids and strings.
Installation
npm install uniquechars
Usage
1. To get unique random strings
With ES6 module syntax
To get unique random strings without parameters
console // ⇨ 'QB|941@D#XK&5YD7' for example
To get unique random strings with parameters
console // ⇨ 'QB|941@D#XK&5YD7' for example
With CommonJS syntax
To get unique random strings without parameters
let UNIQUE_STRING = console // ⇨ 'QB|941@D#XK&5YD7' for example
To get unique random strings with parameters
let UNIQUE_STRING = console // ⇨ 'QB|941@D#XK&5YD7' for example
String must be a string data type and length must be a number data type.
2. To get unique random number
With ES6 module syntax
To get unique random strings without parameters
console // ⇨ '1098276235427165' for example
To get unique random strings with parameters
console // ⇨ '1098276235427165' for example
With CommonJS syntax
To get unique random strings without parameters
let UNIQUE_NUMBER = console // ⇨ '1098276235427165' for example
To get unique random strings with parameters
let UNIQUE_NUMBER = console // ⇨ '1098276235427165' for example
Number must be a number data type and length must be a number data type.
3. To get unique random password
With ES6 module syntax
To get unique random password without parameters
console // ⇨ 'QB|941@D#XK&5YD7' for example
To get unique random password with parameters
console // ⇨ 'QB|941@D#XK&5YD7' for example
With CommonJS syntax
To get unique random password without parameters
let UNIQUE_PASS = console // ⇨ 'QB|941@D#XK&5YD7' for example
To get unique random password with parameters
let UNIQUE_PASS = console // ⇨ 'QB|941@D#XK&5YD7' for example
String must be a string data type and length must be a number data type.
Default parameters
console // ⇨ 'QB|941@D#XK&5YD7' for example string = "#@%&*!(){}[]=_+|/\/ABCDEFGHIJKLMOPQRSTUVWXYZ1234567890" length = 16
console // ⇨ '1098276235427165' for example number = "1234567890" length = 16
console // ⇨ 'QB|941@D#XK&5YD7' for example string = "#@%&*!(){}[]=_+|/\/ABCDEFGHIJKLMOPQRSTUVWXYZ1234567890" length = 16
Author
License
MIT LICENSE