An implementation of the Durstenfeld algorithm for shuffling collections.
yarn add @pacote/shuffle
import { shuffle } from '@pacote/shuffle'
shuffle([1, 2, 3])
shuffle<T>(items: T[]): T[]
shuffle()
takes an item sequence and returns a randomly permutated sequence
of its elements.
MIT © Luís Rodrigues.