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

x/revoltio/src/lib.ts>Collection#sweep

No-nonsense Revolt library for nodejs and deno.
Latest
method Collection.prototype.sweep
Re-export
import { Collection } from "https://deno.land/x/revoltio@v1.0.0/src/lib.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