randum
Stores parameters used to randomly generate items.
Installation
npm install randum
Usage
Random Integers
Storing parameters and generating a random item.
var randum = ; // print a random int from 1 to 10randum;console;
Random Floats
The final parameter in float
is precision, the value passed to toFixed
before output is passed to parseFloat
.
// print a randum float from 5.5 to 10randum;console;
Random Array Item
// prints a, b, or crandum;console;
Test
randum uses the Jest testing framework. Run npm test
to execute all tests.