math-random is an isomorphic, drop-in replacement for Math.random
that uses cryptographically secure random number generation, where available
npm install math-random
console.log(require('math-random')())
=> 0.584293719381094
console.log(require('math-random/is-secure'))
=> true || false