Function: excludeAsync()
Returns an async iterable containing the values of asyncIterable
in
iteration order excluding the values of excluded
.
Example
console.log(
await pipe(
asAsync([`sloth`, `sleep`, `fast`, `slow`, `mean`]),
excludeAsync([`mean`, `fast`]),
reduceAsync(toArray()),
),
)
//=> [ 'sloth', 'sleep', 'slow' ]
excludeAsync(excluded)
excludeAsync(
excluded
): <Value
>(asyncIterable
) =>AsyncIterable
<Value
,any
,any
>
Returns an async iterable containing the values of asyncIterable
in
iteration order excluding the values of excluded
.
Parameters
• excluded: Iterable
<unknown
, any
, any
>
Returns
Function
Type Parameters
• Value
Parameters
• asyncIterable: AsyncIterable
<Value
, any
, any
>
Returns
AsyncIterable
<Value
, any
, any
>
Example
console.log(
await pipe(
asAsync([`sloth`, `sleep`, `fast`, `slow`, `mean`]),
excludeAsync([`mean`, `fast`]),
reduceAsync(toArray()),
),
)
//=> [ 'sloth', 'sleep', 'slow' ]
Defined in
excludeAsync(excluded, asyncIterable)
excludeAsync<
Value
>(excluded
,asyncIterable
):AsyncIterable
<Value
,any
,any
>
Returns an async iterable containing the values of asyncIterable
in
iteration order excluding the values of excluded
.
Type Parameters
• Value
Parameters
• excluded: Iterable
<unknown
, any
, any
>
• asyncIterable: AsyncIterable
<Value
, any
, any
>
Returns
AsyncIterable
<Value
, any
, any
>
Example
console.log(
await pipe(
asAsync([`sloth`, `sleep`, `fast`, `slow`, `mean`]),
excludeAsync([`mean`, `fast`]),
reduceAsync(toArray()),
),
)
//=> [ 'sloth', 'sleep', 'slow' ]