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

x/revoltio/deps.ts>Collection#sweep

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