Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/collection/src/Collection.ts>Collection#some

Utility data structure for Deno (Discord.js Collection).
Latest
method Collection.prototype.some
import { Collection } from "https://deno.land/x/collection@v1.0.1/src/Collection.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