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

x/revoltio/src/util/mod.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/src/util/mod.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