Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/revoltio/src/lib.ts>Collection#filter

No-nonsense Revolt library for nodejs and deno.
Latest
method Collection.prototype.filter
Re-export
import { Collection } from "https://deno.land/x/revoltio@v1.0.0/src/lib.ts";

Identical to Array.filter(), but returns a Collection instead of an Array.

Examples

collection.filter(user => user.username === 'Bob');

Type Parameters

K2 extends K

Parameters

fn: (
value: V,
key: K,
collection: this,
) => key is K2

The function to test with (should return boolean)

Type Parameters

V2 extends V

Parameters

fn: (
value: V,
key: K,
collection: this,
) => value is V2

Parameters

fn: (
value: V,
key: K,
collection: this,
) => boolean

Type Parameters

This
K2 extends K

Parameters

fn: (
this: This,
value: V,
key: K,
collection: this,
) => key is K2
thisArg: This

Type Parameters

This
V2 extends V

Parameters

fn: (
this: This,
value: V,
key: K,
collection: this,
) => value is V2
thisArg: This

Parameters

fn: (
this: This,
value: V,
key: K,
collection: this,
) => boolean
thisArg: This