Function: takeWhileConcur()
Returns a concur iterable containing the values of concurIterable
in
iteration order up until but not including the first value for which fn
returns a value awaitable to a falsy value.
Example
console.log(
await pipe(
asConcur([1, 2, 3, 4, 5, 6, 7, 8, `sloth`]),
takeWhileConcur(value => value < 5),
reduceConcur(toArray()),
),
)
//=> [ 1, 2, 3, 4 ]
Since
v0.0.2
Call Signature
takeWhileConcur<
Value
>(fn
): (concurIterable
) =>ConcurIterable
<Value
>
Type Parameters
• Value
Parameters
fn
(value
) => unknown
Returns
Function
Parameters
concurIterable
ConcurIterable
<Value
>
Returns
ConcurIterable
<Value
>
Defined in
Call Signature
takeWhileConcur<
Value
>(fn
,concurIterable
):ConcurIterable
<Value
>
Type Parameters
• Value
Parameters
fn
(value
) => unknown
concurIterable
ConcurIterable
<Value
>
Returns
ConcurIterable
<Value
>