Reference · Rules, games and records
hashSeedfunction
A whole number from a seed given as a number or as text: the same seed is always the same number, in every browser and every Node.
Import it
import { hashSeed } from "@johnmorrisdotca/sugoroku";
Definition
function hashSeed(seed: number | string): number
Parameters
| Name | Type | Description |
|---|---|---|
seed | string | number | A reproducible numeric or text seed. |
Returns
number
A whole number from a seed given as a number or as text: the same seed is always the same number, in every browser and every Node.
Examples
import { hashSeed } from "@johnmorrisdotca/sugoroku";
console.log(hashSeed("sample"));2531492519What it prints (run when this page was built)