User-friendly pseudorandom number generator (PRNG)
This is not cryptographically secure.
$ npm install randoma
const Randoma = require('randoma');
const random = new Randoma({seed: 10});
random.integer();
//=> 2027521326
random.integer();
//=> 677268843
(new Randoma({seed: '๐ฆ'}).integer());
//=> 1659974344
(new Randoma({seed: '๐ฆ'}).integer());
//=> 1659974344
Type: Object
Required
Type: string
integer
Initialization seed. Multiple instances of Randoma
with the same seed will generate the same random numbers.
"Pull request welcome" for additional commonly used random methods.
Returns a random seed you could use in the seed
option if you for some reason don't want deterministic randomness.
- park-miller - Park-Miller pseudorandom number generator (PRNG)
MIT ยฉ Sindre Sorhus