Package Exports
- @qwertyr0/ezrandom
- @qwertyr0/ezrandom/main.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@qwertyr0/ezrandom) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
ezrandom
ezrandom is a simple random number generator library.
📦Installation
You can use npm to install:
npm i git+https://github.com/QwertyR0/ezrandom.git👩💻USAGE:
const ezRandom = require('ezrandom');
//random integer:
ezRandom.genInt(1, 3);
//-> 2
ezRandom.genInt(1, 3, 4);
//-> [1, 3, 2, 3]
ezRandom.genInt(1, 3, 4, {useRandomorg: true});
//-> [3, 3 ,1, 2]
// fetches from https://random.org/integers/
//random selection:
ezRandom.selection(["a", "b"], 1);
//-> ["a"]
// possibility:
ezRandom.possibility(1, 10, 3, 4);
//-> 1.39
//random password:
ezRandom.password({
passLength: 11
});
//-> naxohnjykom
// I will Add More Options To Password Generation!
//random rgb color value:
ezRandom.ranColor.rgb();
//-> [ 52, 7, 109 ]
//random hex color value:
ezRandom.ranColor.hex();
//-> #a97b30🧙♂️Maintainer
QwertyR0
🚧Todo:
- Add more support for https://random.org/
- Make .password() better
🐛Bugs:
Create a issue here
📱Contact:
Discord: Qwerty.R#9850
