Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@randomized/random

randomized-algorithm1.3kAGPL-3.04.1.0

Randomness algorithms for JavaScript

javascript, js, randfloat, randint, random, randomness, sample, shuffle

readme

:game_die: @randomized/random


© xkcd.com

Randomness algorithms for JavaScript. See docs. Parent is js-algorithms.

:warning: Depending on your environment, the code may require regeneratorRuntime 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 '@randomized/random' ;

License Version Tests Dependencies GitHub issues Downloads

Code issues Code maintainability Code coverage (cov) Code technical debt Documentation Package size