Function: filterMapConcur()
Returns a concur iterable containing the values of concurIterable
transformed by fn
excluding the values for which fn
returns a value
awaitable to null
or undefined
.
Example
console.log(
await pipe(
asConcur([
{ sloth: `sloth party` },
{ notSloth: `building` },
{ sloth: `sloths in trees` },
{ notSloth: `city` },
]),
filterMapConcur(object => object.sloth),
reduceConcur(toArray()),
),
)
//=> [ 'sloth party', 'sloths in trees' ]
filterMapConcur(fn)
filterMapConcur<
From
,To
>(fn
): (concurIterable
) =>ConcurIterable
<NonNullable
<To
>>
Returns a concur iterable containing the values of concurIterable
transformed by fn
excluding the values for which fn
returns a value
awaitable to null
or undefined
.
Type Parameters
• From
• To
Parameters
• fn
Returns
Function
Parameters
• concurIterable: ConcurIterable
<From
>
Returns
ConcurIterable
<NonNullable
<To
>>
Example
console.log(
await pipe(
asConcur([
{ sloth: `sloth party` },
{ notSloth: `building` },
{ sloth: `sloths in trees` },
{ notSloth: `city` },
]),
filterMapConcur(object => object.sloth),
reduceConcur(toArray()),
),
)
//=> [ 'sloth party', 'sloths in trees' ]
Defined in
filterMapConcur(fn, concurIterable)
filterMapConcur<
From
,To
>(fn
,concurIterable
):ConcurIterable
<NonNullable
<To
>>
Returns a concur iterable containing the values of concurIterable
transformed by fn
excluding the values for which fn
returns a value
awaitable to null
or undefined
.
Type Parameters
• From
• To
Parameters
• fn
• concurIterable: ConcurIterable
<From
>
Returns
ConcurIterable
<NonNullable
<To
>>
Example
console.log(
await pipe(
asConcur([
{ sloth: `sloth party` },
{ notSloth: `building` },
{ sloth: `sloths in trees` },
{ notSloth: `city` },
]),
filterMapConcur(object => object.sloth),
reduceConcur(toArray()),
),
)
//=> [ 'sloth party', 'sloths in trees' ]