2.0.0 • Published 2 years ago

3h-random v2.0.0

Weekly downloads
33
License
MIT
Repository
github
Last release
2 years ago

3h-random

A randomizer lib.

Usage

/**
 * Employ one of the following to import this lib
 * or access the global namespace `HRandom` directly
 * if you are using it as a UMD module.
 * - import HRandom from '3h-random';
 * - const HRandom = require('3h-random');
 */

const randomizer = new HRandom.Randomizer({
    // seed: ...
    // cursor: ...
    // m: ...
    // a: ...
    // b: ...
});

console.log(randomizer.float(0, 1));
console.log(randomizer.integer(0, 100));

randomizer.reset(seed, cursor);

console.log(randomizer.boolean(0.5));
console.log(randomizer.string(16));
console.log(randomizer.choice(choices));

Links

2.0.0

2 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago