crypto-rand
v0.0.2 random rand generator crypto
crypto-rand
JavaScript's Math.random
is not so random. Node.js offers a good source of randomness with it's crypto
library.
However, crypto
deals only in byte streams. Enter crypto-rand
, a nice little library that gives 48 bits of delicous randomness.
API
.rand()
: a random double on [0,1).randRange(n)
: an integer which is the floor of a double on [0,n).randInt(min, max)
: an integer which is the floor of a double on [min,max+1)
npm i crypto-rand
Source Code
github.com/crazymykl/crypto-...Metadata
- MIT
- Whatever
- Mike MacDonald
- released 2/25/2013