@tempots/std
removeAllFromArray() function
Removes all occurrences of an item from an array.
Signature:
removeAllFromArray: (arr: A[], item: A) => boolean
Parameters
Parameter |
Type |
Description |
---|---|---|
arr |
A[] |
The array from which to remove the item. |
item |
A |
The item to remove from the array. |
Returns: boolean
true
if at least one occurrence was found and removed, false
otherwise.