Home > @gglib/utils > addToArraySet

addToArraySet() function

Adds an item to given array but only if it is not already included

Signature:

export declare function addToArraySet<T>(set: T[], item: T): boolean;

Parameters

Parameter Type Description
set T[] the array
item T the item

Returns:

boolean