randomalll
v1.0.3
Published
Generate random number,random alphunumeric and random alphabets based on dynamic length passed as argument.
Downloads
10
Maintainers
Readme
Random Number/String Generator
Install:
npm install randomalll --save
Usage:
const rand = require("randomalll");
//If you want capital(Upper) letter random string
rand.randomUpperAlphabet(length);
// Example
rand.randomUpperAlphabet(5) // Output: AJUKL
rand.randomUpperAlphabet(10) // Output: KLJDHHUDKL
rand.randomUpperAlphabet(2) // Output: RT
//If you want small(Lower) letter random string
rand.randomLowerAlphabet(length);
// Example
rand.randomLowerAlphabet(5) // Output: ajklp
rand.randomLowerAlphabet(10) // Output: hjglwpadwe
rand.randomLowerAlphabet(2) // Output: lr
//If you want upper and lower letter random string
rand.randomString(length);
// Example
rand.randomString(5) // Output: AjkLp
rand.randomString(10) // Output: HUkLmuIJgT
rand.randomString(2) // Output: Lu
//If you want Only numeric random number
rand.randomNumber(length);
// Example
rand.randomNumber(5) // Output: 18973
rand.randomNumber(10) // Output: 9874638212
rand.randomNumber(2) // Output: 65