iteragain
Version:
Javascript Iterable/Iterator/Generator-function utilities.
10 lines • 668 B
TypeScript
import type { IterSource, Iteratee, IteratorOrIterable } from './types';
/**
* Maps and filters the input iterator in the same `iteratee` function.
* @param iteratee A function that maps each value in this iterator to a new value and also filters out any that
* return a nullish value.
*/
export declare function filterMap<T extends IteratorOrIterable<any>, R>(arg: T, iteratee: Iteratee<IterSource<T>, R>): IterableIterator<NonNullable<R>>;
export declare function filterMap<T extends IteratorOrIterable<any>, R>(iteratee: Iteratee<IterSource<T>, R>): (arg: T) => IterableIterator<NonNullable<R>>;
export default filterMap;
//# sourceMappingURL=filterMap.d.ts.map