Skip to main content

Home > @jsplumb/util > removeWithFunction

removeWithFunction() function#

Remove the entry from the array for which the function f returns true.

Signature:

export declare function removeWithFunction<T>(a: Array<T>, f: (_a: T) => boolean): boolean;

Parameters#

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

Returns:

boolean

true if an element was removed, false if not.