/** * Shuffle an array using the Fisher-Yates algorithm with the built-in {@link Math.random} function. */ declare function shuffle(array: T[]): T[]; /** * Map an array. * For the asynchronous version, see {@link maps}. */ declare function map(array: T[], callbackfn: (value: T, index: number, array: T[]) => U): U[]; /** * Map an array asynchronously awaiting on each iteration. * For the synchronous version, see {@link map}. */ declare function maps(array: T[], callbackfn: (value: T, index: number, array: T[]) => U | Promise): Promise; /** * Split an array into chunks. */ declare function chunk(array: T[], size: number): T[][]; /** * Split an array into chunks using a generator. */ declare function chunkify(array: T[], size: number): Generator; export { chunk, chunkify, map, maps, shuffle };