tiny-essentials
Version:
Collection of small, essential scripts designed to be used across various projects. These simple utilities are crafted for speed, ease of use, and versatility.
11 lines • 437 B
text/typescript
/**
* Randomly shuffles the elements of an array in place using the Fisher–Yates algorithm.
*
* This implementation ensures a uniform distribution of permutations.
* Original algorithm source: StackOverflow (link above).
*
* @param {any[]} items - The array to shuffle.
* @returns {any[]} The same array instance, now shuffled in place.
*/
export function shuffleArray(items: any[]): any[];
//# sourceMappingURL=array.d.mts.map