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