Skip to content

🪙 An *incredibly* complex and *modular* package to flip a coin. Built in TypeScript.

License

Notifications You must be signed in to change notification settings

filippo-fonseca/ts-shuffle

Repository files navigation

🪙 ts-shuffle

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

NOTE: This is a joke I made in the first day of my computer science class at my HS. Feel free to use it though, ig? xD

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.

About

🪙 An *incredibly* complex and *modular* package to flip a coin. Built in TypeScript.

Resources

License

Stars

Watchers

Forks

Packages

No packages published