type SplitOptions = { filter_fn?: (el: T) => boolean; }; /** * Splits the provided array or set in a set of batches according to the provided size * For Example: * split([1, 2, 3, 4, 5], 2) -> [[1,2],[3,4],[5]] * * For Example w/ filter * split([1, false, 3, 4, 5], 2, {filter_fn: el => isInteger(el)}) -> [[1, 3], [4, 5]] * * @param {T[]|Set} val - Array or Set to split * @param {number} size - Size of batches * @param {SplitOptions?} opts - Split options */ declare function split(arr: T[] | Set, size: number, opts?: SplitOptions): T[][]; export { split, split as default };