Skip to main content
Deno 2 is finally here 🎉️
Learn more

Shuffle Array (Deno)

License GitHub Repository GitHub Stars GitHub Contributors GitHub Issues GitHub Pull Requests GitHub Discussions CodeFactor Grade

Releases Latest (GitHub Latest Release Date) Pre (GitHub Latest Pre-Release Date)
Deno Land
GitHub GitHub Total Downloads GitHub Latest Release Version GitHub Latest Pre-Release Version

📝 Description

A Deno module to shuffle the array’s indexes.

🔗 Other Edition:

📚 Documentation

Getting Started

  • Deno >= v1.34.0
import shuffleArray from "https://deno.land/x/shuffle_array/mod.ts";// Default Import

API

Function

shuffleArray<T>(item: T[]): T[];

Example

let chain = [3, 7, 25, 26, 42, 62, 71, 76, 92, 93];

shuffleArray(chain);
//=> [62, 93, 26, 42, 25, 7, 76, 71, 3, 92]

shuffleArray(chain);
//=> [42, 3, 26, 62, 93, 7, 76, 25, 92, 71]