xdashReadme | API


xdash / filter

Function: filter()

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

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

Type parameters

T

Parameters

arr: T[]

array to filter

fn

callback to filter the array

Returns

T[]

the filtered array

Source

array.ts:105