Skip to main content
Module

x/denofun/filter.ts>default

Small utility library containing functions, monads and other fun stuff.
Latest
function default
import { default } from "https://deno.land/x/denofun@v0.2.0/filter.ts";

filter runs filter function on every element of array and returns a new array with only those elements for which filter function returned true

Parameters

fn: (x: T) => boolean

filter function

xs: T[]

input array to be filtered

Returns

T[]

filtered output array