Skip to main content

Home > @jsplumb/util > getFromSetWithFunction

getFromSetWithFunction() function#

Extract a value from the set where the given predicate returns true for that value.

Signature:

export declare function getFromSetWithFunction<T>(s: Set<T>, f: (_a: T) => boolean): T;

Parameters#

ParameterTypeDescription
sSet<T>
f(_a: T) => boolean

Returns:

T