Reference · Rolls and exact odds
seededSourcefunction
sfc32 started from a text seed: the same seed gives the same rolls on every platform, forever. Not for anything that must be unguessable.
Import it
import { seededSource } from "@johnmorrisdotca/korokoro";
Definition
function seededSource(seed: string): RandomSource
Parameters
| Name | Type | Description |
|---|---|---|
seed | string | Text that reproduces the same random sequence, or null for an unseeded stored roll. |
Returns
RandomSource
sfc32 started from a text seed: the same seed gives the same rolls on every platform, forever. Not for anything that must be unguessable.
Examples
import { seededSource } from "@johnmorrisdotca/korokoro";
console.log(seededSource("table").next() === seededSource("table").next());trueWhat it prints (run when this page was built)