Skip to content

xdash API Reference v0.5.14


xdash API Reference / filter

Function: filter()

filter<T>(arr, fn): T[]

Defined in: src/array.ts:146

Removes elements from an array for which the callback returns false.

Type Parameters

T

T

Parameters

arr

T[]

array to filter

fn

(value, index, array) => unknown

callback to filter the array

Returns

T[]

the filtered array

Released under the MIT License.