0.1.0 • Published 6 years ago

itay-random v0.1.0

Weekly downloads
-
License
ISC
Repository
-
Last release
6 years ago

itay-random

A simple quick seedable random.

Install

npm install --save itay-random

Basic Usage

const createRandom = require("./index").default;

const random = createRandom(17);
let value1 = random(); // 0.9998888820409775 (Always the first value of seed 17)
let value2 = random(); // 0.10998758506988437 (Always the second value of seed 17)

const randomSeed = createRandom(); // Uses 'new Date()' as a seed.
let randomSeedValue = randomSeed(); // Changes every run.

Performance

Faster than the native Math.random().

0.1.0

6 years ago

0.0.1

6 years ago