UNPKG

iteragain

Version:

Javascript Iterable/Iterator/Generator-function utilities.

9 lines 623 B
import type { IteratorOrIterable, Tuple } from './types'; /** * Divide the elements from `arg` into `n` parts, maintaining order. Note, this method will fully iterate through `arg` * before returning a result. If you don't want this behavior and don't care about order then use `distribute` instead. */ export declare function divide<T, Size extends number>(arg: IteratorOrIterable<T>, n: Size): Tuple<IterableIterator<T>, Size>; export declare function divide<T, Size extends number>(n: Size): (arg: IteratorOrIterable<T>) => Tuple<IterableIterator<T>, Size>; export default divide; //# sourceMappingURL=divide.d.ts.map