- filter<V>(it, f): AsyncGenerator<V>
Parameters
- it: AsyncIterable<V>
- f: ((v: V) => boolean | Promise<boolean>)
- (v): boolean | Promise<boolean>
Returns boolean | Promise<boolean>
Returns AsyncGenerator<V>
- filter<V>(it, f): Generator<V>
Parameters
- it: AsyncIterable<V>
- f: ((v: V) => boolean)
- (v): boolean
Returns boolean
Returns Generator<V>
Filters an iterable, only yielding items which match
f
.When using async iterables,
f
can be async as well.Param: it
Param: f