Returns a randomly shuffled copy of a collection using the Durstenfeld algorithm.
The input collection is not modified.
Items to shuffle.
A new array containing the same items in random order.
import { shuffle } from '@pacote/shuffle'shuffle([1, 2, 3]) // => a shuffled copy of the array Copy
import { shuffle } from '@pacote/shuffle'shuffle([1, 2, 3]) // => a shuffled copy of the array
Returns a randomly shuffled copy of a collection using the Durstenfeld algorithm.
The input collection is not modified.