UNPKG

remeda

Version:

A utility library for JavaScript and Typescript.

31 lines (29 loc) 935 B
import { IterableContainer } from "./IterableContainer-B2PfkIAC.js"; import { ReorderedArray } from "./ReorderedArray-D1j71ZsD.js"; //#region src/shuffle.d.ts /** * Shuffles the input array, returning a new array with the same elements in a random order. * * @param items - The array to shuffle. * @signature * R.shuffle(array) * @example * R.shuffle([4, 2, 7, 5]) // => [7, 5, 4, 2] * @dataFirst * @category Array */ declare function shuffle<T extends IterableContainer>(items: T): ReorderedArray<T>; /** * Shuffles the input array, returning a new array with the same elements in a random order. * * @signature * R.shuffle()(array) * @example * R.pipe([4, 2, 7, 5], R.shuffle()) // => [7, 5, 4, 2] * @dataLast * @category Array */ declare function shuffle(): <T extends IterableContainer>(items: T) => ReorderedArray<T>; //#endregion export { shuffle }; //# sourceMappingURL=shuffle-DYdFk0cy.d.ts.map