iteragain
Version:
Javascript Iterable/Iterator/Generator-function utilities.
9 lines • 469 B
TypeScript
import type { IteratorOrIterable, Predicate } from './types';
/**
* Partitions this iterator into a tuple of `[falsey, truthy]` corresponding to what `predicate` returns for each
* value.
*/
export declare function partition<T>(arg: IteratorOrIterable<T>, predicate: Predicate<T>): [T[], T[]];
export declare function partition<T>(predicate: Predicate<T>): (arg: IteratorOrIterable<T>) => [T[], T[]];
export default partition;
//# sourceMappingURL=partition.d.ts.map