arand
Generate an almost random number of a given length
Installation
npm install arand --save
What?
Almost random? What kind of sorcery is this?
arand(length, x)
generates a random number of a given length
where at least x
of the digits are the same. This generates numbers that are easy to remember and type. arand()
is perfect when generating codes used for two way authentication.
Usage
const arand = ; ;//=> 808 ;//=> 6768 ;//=> 9993 ;//=> 242227
License
MIT © Daniel Eckermann