🎲 @aureooms/js-random
© xkcd.com
Randomness algorithms for JavaScript. See docs. Parent is @aureooms/js-algorithms.
⚠️ Depending on your environment, the code may requireregeneratorRuntime
to be defined, for instance by importing regenerator-runtime/runtime.
import {
randint , // randint(i, j) -> [i, j[ \cap ZZ
randfloat , // randfloat(i, j) -> [i, j[
sample , // /!\ in-place
shuffle , // /!\ in-place
} from '@aureooms/js-random' ;