Repository
Current version released
4 years ago
Versions
deno_shuffle
The Fisher-Yates (aka Knuth) shuffle for Deno. See a great visualization.
Usage
import shuffle from "https://deno.land/x/shuffle/mod.ts";
shuffle(["a", "b", "c", "d"]);
Example
deno run https://deno.land/x/shuffle/example.ts
About
- Fisher-Yates shuffle: https://en.wikipedia.org/wiki/Fisher-Yates_shuffle
- a great visualization: https://bost.ocks.org/mike/shuffle/
License
deno_shuffle is released under the MIT License. See the bundled LICENSE file for details.