@faustbrian/node-deterministic-array-shuffle
v1.0.0
Published
A deterministic method to shuffle array items for @nodejs
Downloads
4
Readme
You can help the author become a full-time open-source maintainer by sponsoring him on GitHub.
@faustbrian/node-deterministic-array-shuffle
Installation
pnpm install @faustbrian/node-deterministic-array-shuffle
Usage
import { shuffle } from "@faustbrian/node-deterministic-array-shuffle";
shuffle("1", [1, 2, 3, 4, 5]) // [1, 5, 4, 3, 2]
shuffle("2", [1, 2, 3, 4, 5]) // [2, 3, 5, 4, 1]
shuffle("3", [1, 2, 3, 4, 5]) // [4, 3, 5, 1, 2]
License
This is an open-sourced software licensed under the AGPL-3.0-or-later.