1.0.1 • Published 7 years ago

random2 v1.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

random2

npm license CircleCI CodeCov

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 number

Or 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 test

Typings

Typescript defenitions are included with the package.

import { Random } from "random2";
let myRandom = new Random();
myRandom.next(); // => Get a number