- Preparing search index...
- The search index is not available
itr8
- takeWhile<TIn>(filterFn: ((x: TIn) => boolean | Promise<boolean>)): TTransIteratorSyncOrAsync<TIn, TIn>
-
Parameters
-
filterFn: ((x: TIn) => boolean | Promise<boolean>)
-
- (x: TIn): boolean | Promise<boolean>
-
Returns boolean | Promise<boolean>
Only take elements as long as 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)!