Here's a list of packages that are included in this build:
@js-random/numberGitHub repo, NPM
@js-random/stringGitHub repo, NPM
@js-random/booleanGitHub repo, NPM
@js-random/dateGitHub repo, NPM
For each individual package - see links above.
If you want everything at once, just do:
npm i -S @js-random/all
There are two ways to use
@js-random/all: imported and global.
This way you need to import the object containing all the randomizers yourself:
// Every @js-random package is contained in this object by their respective nameconst random = ;
// For example - `@js-random/number` and `@js-random/boolean`:; // random number from 0 to 10 (inclusive); // half the chance of getting `true` or `false`; // 99% of getting `true`
This setup introduces side-effects: each package's function is inserted into global constructors as
;; // 99% of getting `true`// Same is true for String, Date and etc.