Home > rc-js-util > mapRemoveManyFromArray
Used with maps that store arrays. Where an array exists for a given key the values will be removed from that array.
Signature:
export declare function mapRemoveManyFromArray<TKey extends object, TValue>(map: WeakMap<TKey, TValue[]>, key: TKey, itemsToRemove: TValue[]): number;
| Parameter | Type | Description |
|---|---|---|
| map | WeakMap<TKey, TValue[]> | The Map to check. May be modified. |
| key | TKey | The key to lookup in map. |
| itemsToRemove | TValue[] | The values to remove. |
Returns:
number
The number of items that were removed.