Skip to content

Latest commit

 

History

History
46 lines (30 loc) · 1.18 KB

Readme.md

File metadata and controls

46 lines (30 loc) · 1.18 KB

srand

Build status Git tag NPM version Code style

Seeded random number generator using a linear congruential generator. This is NOT cryptographically secure.

Installation

$ npm install @f/srand

Usage

var srand = require('@f/srand')

var rand = srand(4)

rand()
rand()
rand()

API

srand(seed)

  • seed - RNG seed. May be integer or string.

Returns: A function that, when called, generates the next random number in the sequence.

License

MIT