davidbau/seedrandom — pull request #5 by davidbau (2014-05-11 12:35:21+00:00)
Title: Proposed new version

This adds an options object so that you can set Math.random like this:

seedrandom('hello.', {global: true});
rng = seedrandom('hello.', {entropy: true});
rng = Math.seedrandom('hello.', {global:false});

Options include:

global - true mutates Math.random and returns seed.
false doesn't touch Math.random and returns PRNG.
absent mimics old behavior (Math.seedrandom:true, module:false).
entropy - true mixes entropy.
false or absent doesn't mix entropy.
pass - fn supplies a callback argument. calls
fn(prng, seed, global)

The old calling conventions still work: you can pass a boolean
as the second argument to be treated as "entropy: bool"; and
you can pass the callback as the third arugment.