0.0.2 • Published 8 years ago

prng48 v0.0.2

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

prng48

Psuedo random number generator which uses randomBytes() from the Node.js crypto module under the hood.

npm i --save prng48

Usage

const prng = require('prng48')

console.log(prng())
// 0 - 281474976710655 e.g. 1453965

console.log(prng(10))
// 0 - 10 e.g. 7

console.log(prng(100, 150))
// 100 - 150 e.g. 134

console.log(prng.random())
// 0 - 1 e.g. 0.8869092848824027

console.log(prng.MAX_VALUE)
// 281474976710655