Skip to content

ransu

const ransu: RansuApi

Defined in: src/namespace/index.ts:114

Every function in one object, and callable itself as a shorthand for random.

The default export. Each property is the very same function object as the matching named export, not a wrapper around it.

import ransu from "ransu";
ransu(); // 0.7401962... same as ransu.random()
ransu.integer(1, 6);
ransu.pick(["a", "b", "c"]);
ransu.uuid.v7();
ransu.engines.pcg32(42);
// Seeding here changes every top-level function.
ransu.seed(42);