Skip to content

filterSet

filterSet<T>(set, filterFunction): Set<T>

Defined in: utils/set.ts:7

Filters a Set based on the provided filter function.

Type Parameters

T

Parameters

set

Set<T>

The original Set to filter.

filterFunction

(item) => boolean

The function used to filter the Set.

Returns

Set<T>

A new Set containing only the elements that satisfy the filter function.