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