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

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

Utility data structure for Deno (Discord.js Collection).
Latest
method Collection.prototype.sweep
import { Collection } from "https://deno.land/x/collection@v1.0.1/src/Collection.ts";

Removes items that satisfy the provided filter function.

Parameters

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

Function used to test (should return a boolean)

Returns

number

The number of removed entries

Parameters

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

Returns

number