This is a
playground to test code. It runs a full
Node.js environment and already has all of
npm’s 400,000 packages pre-installed, including
prng with all
npm packages installed. Try it out:
This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.
var PRNG = require('prng'), prng = new PRNG(123456789); prng.rand(9) // => random number in a range from 0 to 9 prng.rand(10, 100) // => random number in a range from 10 to 100 prng.rand(-1000, -700) // => random number in a range from -1000 to -700 prng = new PRNG(); // use default seed prng.rand(5555) // => 930