caoge c760052ff9 机车状态修改 | 8 months ago | |
---|---|---|
.. | ||
.travis.yml | 8 months ago | |
browser.js | 8 months ago | |
node.js | 8 months ago | |
package.json | 8 months ago | |
readme.md | 8 months ago | |
test.js | 8 months ago |
math-random is an drop-in replacement for Math.random that uses cryptographically secure random number generation, where available. It works in both browser and node environments.
npm install math-random
var random = require('math-random')
console.log(random())
=> 0.584293719381094
console.log(random.cryptographic)
=> true || undefined