Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/revoltio/deps.ts>Collection#every

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

Checks if all items passes a test. Identical in behavior to Array.every().

Examples

collection.every(user => !user.bot);

Type Parameters

K2 extends K

Parameters

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

Function used to test (should return a boolean)

Returns

this is Collection<K2, V>

Type Parameters

V2 extends V

Parameters

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

Returns

this is Collection<K, V2>

Parameters

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

Returns

boolean

Type Parameters

This
K2 extends K

Parameters

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

Returns

this is Collection<K2, V>

Type Parameters

This
V2 extends V

Parameters

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

Returns

this is Collection<K, V2>

Parameters

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

Returns

boolean