@hortemo/seeded-shuffle
v1.0.2
Published
Deterministic, seed-based shuffle for JS/TS.
Maintainers
Readme
@hortemo/seeded-shuffle
Deterministically shuffle arrays with a repeatable seed.
Install
npm i @hortemo/seeded-shuffleUsage
import seededShuffle from "@hortemo/seeded-shuffle";
const original = [1, 2, 3, 4, 5];
const shuffled = seededShuffle(original, "my-seed");API
seededShuffle<T>(input, seed) returns a shuffled copy of input using a seedrandom PRNG.
