@pacote/shuffle
TypeScript icon, indicating that this package has built-in type declarations

2.0.2 • Public • Published

@pacote/shuffle

version minified minified + gzip

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.

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i @pacote/shuffle

      Weekly Downloads

      14

      Version

      2.0.2

      License

      MIT

      Unpacked Size

      9.79 kB

      Total Files

      13

      Last publish

      Collaborators

      • goblindegook