fisher-yates-shuffle-maxent
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

Fisher Yates Shuffle package

This package is a simple implementation of the Fisher Yates Shuffle algorithm. It is a simple and efficient algorithm to shuffle a list of elements.

Installation

npm install fisher-yates-shuffle

or

yarn add fisher-yates-shuffle

or

pnpm add fisher-yates-shuffle

Usage

CommonJS

const shuffle = require("fisher-yates-shuffle");

const list = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];

const shuffledList = shuffle(list);

ES6

import { FisherYates } from "fisher-yates-shuffle";

const list = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];

const shuffledList = FisherYates(list);

Readme

Keywords

none

Package Sidebar

Install

npm i fisher-yates-shuffle-maxent

Weekly Downloads

1

Version

1.0.0

License

ISC

Unpacked Size

4.86 kB

Total Files

8

Last publish

Collaborators

  • maxent