fx-flow v0.7.0 / pipe/lazy / takeUntil
Function: takeUntil()
takeUntil(fn, iterable)
takeUntil<
A
>(fn
,iterable
):IterableIterator
<A
>
Take values from iterable/AsyncIterable until fn
returns true
Type parameters
• A
Parameters
• fn
• iterable: Iterable
<A
>
Returns
Example
typescript
const iterator = filter((v) => v > 2, [1, 3, 4])
iterator.next().value = 1
iterator.next().value = 3
iterator.next().done = true
Source
packages/core/src/pipe/lazy/takeUntil.ts:85
takeUntil(fn, iterable)
takeUntil<
A
>(fn
,iterable
):AsyncIterableIterator
<A
>
Type parameters
• A
Parameters
• fn
• iterable: AsyncIterable
<A
>
Returns
Source
packages/core/src/pipe/lazy/takeUntil.ts:86
takeUntil(fn)
takeUntil<
A
>(fn
): (iterable
) =>IteratorReturnValue
<A
>
Type parameters
• A extends UniversalIterable
Parameters
• fn
Returns
Function
Parameters
• iterable: A