Home > rc-js-util > arrayRemoveOne
Removes either 0 or one item from items, even if itemToRemove appears more than once.
Signature:
export declare function arrayRemoveOne<TItem>(items: TItem[], itemToRemove: TItem): boolean;
Parameter | Type | Description |
---|---|---|
items | TItem[] | |
itemToRemove | TItem |
Returns:
boolean
true if an item was removed.
The lowest indexed item will be removed where there is more than one match.
See arrayRemoveOne().