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

Package detail

math-random

michaelrhodes9.2mCC0-1.02.0.1TypeScript support: definitely-typed

math-random is an isomorphic, drop-in replacement for Math.random that uses cryptographically secure random number generation, where available

readme

math-random

math-random is an isomorphic, drop-in replacement for Math.random that uses cryptographically secure random number generation, where available

ci

install

npm install math-random

use

console.log(require('math-random')())
=> 0.584293719381094

console.log(require('math-random/is-secure'))
=> true || false

obey

CC0-1.0