@solandluna/multirandom
v1.0.0
Published
A component that allows random generation of numbers, letters, words and more.
Readme
multirandom
Multiple random number generation algorithms, plus some common lists that an algorithm can generate from, all wrapped into one.
Install
npm install --save multirandomUsage
import Random from "multirandom";
var rng = new Random('middle-square');
console.log('Quick test run for randomizer.')
console.log('randomInt = ' + rng.randomInt(10000));
console.log('randomFloat = ' + rng.randomFloat(5000));
console.log('Random 12 character string: ' + rng.randomString(12));
console.log('4 random words: ' + rng.randomWords(4));
console.log('URL-safe string: ' + rng.randomString(20, 'url-safe'));
console.log('base64 string: ' + rng.randomString(20, 'base64'));
console.log('custom string with exclusively vowels:' + rng.randomString(15, 'aeiouAEIOU'));