@pacote/shuffle
v2.0.2
Published
An implementation of the Durstenfeld algorithm for shuffling collections.
Downloads
100
Maintainers
Readme
@pacote/shuffle
An implementation of the Durstenfeld algorithm for shuffling collections.
Installation
yarn add @pacote/shuffle
Usage
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.