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

x/revoltio/deps.ts>Collection#some

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

Checks if there exists an item that passes a test. Identical in behavior to Array.some().

Examples

collection.some(user => user.discriminator === '0000');

Parameters

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

Function used to test (should return a boolean)

Returns

boolean

Parameters

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

Returns

boolean