1.0.2 • Published 3 years ago

ts-shuffle v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

🪙 ts-shuffle

An incredibly modular & complex package to shuffle the contents of a given array randomly.

Install

npm i ts-shuffle
# or
yarn add ts-shuffle

Use

import { shuffle } from "ts-shuffle";

const arr: number[] = [2, 11, 37, 42];

shuffle(arr);

// Log the shuffled array (ex. [11, 42, 37, 2]):
console.log(arr);

The shuffle function takes in a parameter type of any[], meaning that as long as it is an array, the shuffling process will work. :)

Built and maintained with ❤️ by @FilippoFonseca.

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago