Skip to main content

Function: exclude()

Returns an iterable containing the values of iterable in iteration order excluding the values of excluded.

Example

import { exclude, pipe, reduce, toArray } from 'lfi'

console.log(
pipe(
[`sloth`, `lazy`, `active`, `sleep`, `awake`],
exclude([`awake`, `active`]),
reduce(toArray()),
),
)
//=> [ 'sloth', 'lazy', 'sleep' ]
Playground

Since

v2.0.0

Call Signature

exclude(excluded): <Value>(iterable) => Iterable<Value, any, any>

Parameters

excluded

Iterable<unknown, any, any>

Returns

Function

Type Parameters

Value

Parameters

iterable

Iterable<Value, any, any>

Returns

Iterable<Value, any, any>

Defined in

filters.d.ts:324

Call Signature

exclude<Value>(excluded, iterable): Iterable<Value, any, any>

Type Parameters

Value

Parameters

excluded

Iterable<unknown, any, any>

iterable

Iterable<Value, any, any>

Returns

Iterable<Value, any, any>

Defined in

filters.d.ts:327