shuffle (Functional Programming) es-toolkit
Creates a function that returns a shuffled copy of an array. Use it with pipe.
Info
Usage
shuffle returns a new array containing the same values as the piped array in random order. It does not mutate the input array.
Parameters
This function takes no arguments; call it as shuffle().
Returns
A function that maps a readonly T[] to a shuffled copy.
Source: es-toolkit
Re-exported verbatim from es-toolkit. Implementation, edge cases, and performance behavior are owned upstream. This page mirrors the documentation at the pinned version; the linked source is authoritative.