- Preparing search index...
- The search index is not available
itr8
- filter<TIn>(filterFn: ((v: TIn) => boolean | Promise<boolean>)): TTransIteratorSyncOrAsync<TIn, TIn>
-
Parameters
-
filterFn: ((v: TIn) => boolean | Promise<boolean>)
-
- (v: TIn): boolean | Promise<boolean>
-
Returns boolean | Promise<boolean>
Only keep elements where the filter function returns true.
The filter function can be asynchronous (in which case the resulting iterator will be asynchronous regardless of the input iterator)!