removeAll
removeAll<
T>(array,item,comparisonStrategy?):T[]
Defined in: packages/core/src/array/remove-all.ts:28
Removes all occurrences of an item from an array safely, ensuring that only exact matches are removed.
In asynchronous concurrent scenarios, this function ensures that the item being removed is the same as the one found at the index, preventing accidental removal of different items that may have been inserted or modified in the array during the operation.
Type Parameters
Section titled “Type Parameters”T
Parameters
Section titled “Parameters”T[]
The array to remove items from.
T
The item to remove.
comparisonStrategy?
Section titled “comparisonStrategy?”EqualityComparisonStrategy<T, T> = REMOVE_DEFAULT_COMPARISON_STRATEGY
The equality comparison strategy to use (default is “strict”).
Returns
Section titled “Returns”T[]
An array of removed items.