UNPKG

@jasmith79/sequable

Version:

Library functions for working with generators

11 lines (10 loc) 434 B
import { Sequable } from "./sequable.mjs"; /** * Filters the items of the given Iterator, Iterable, or generator function * using the supplied predicate function. * * @param pred The predicate function. * @param sequable The Iterator, Iterable, or generator function sequence * to filter. */ export declare function filter<F extends (arg: any) => boolean>(pred: F, seq: Sequable<Parameters<F>[0]>): Iterable<Parameters<F>[0]>;