2.0.4 • Published 9 months ago
@pacote/shuffle v2.0.4
@pacote/shuffle
An implementation of the Durstenfeld algorithm for shuffling collections.
Installation
yarn add @pacote/shuffleUsage
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.
License
MIT © Luís Rodrigues.