random2
v1.0.1
Published
A seedable pseudorandom number generator object.
Downloads
4
Readme
random2
Seeded pseudorandom number generator object implementation for NodeJS.
Usage
npm install random2 --save
Use it in your JS like so:
var Random = require("random2").Random;
var myRandom = new Random();
myRandom.next(); // Get a numberOr create a seeded instance:
var myRandom = new Random(42);
myRandom.next();Build
The project's package.json has useful scripts for building the project:
npm install
npm run build
npm testTypings
Typescript defenitions are included with the package.
import { Random } from "random2";
let myRandom = new Random();
myRandom.next(); // => Get a number