* Returns `true` if the `[key, value]` entry exists in the map (i.e. the * given value appears at least once under the given key). * * @experimental **UNSTABLE**: New API, yet to be vetted. * * @param key The key to look up. * @param value The value to check. * @returns `true` i
(key: K, value: V)
| 255 | * ``` |
| 256 | */ |
| 257 | hasEntry(key: K, value: V): boolean { |
| 258 | // `Array.prototype.includes` uses SameValueZero, which matches the |
| 259 | // hand-rolled loop in `deleteEntry()` (and the `Map`/`Set` contract) so |
| 260 | // `NaN` and `±0` behave consistently across the two methods. |
| 261 | return this.#map.get(key)?.includes(value) ?? false; |
| 262 | } |
| 263 | |
| 264 | /** |
| 265 | * Removes all values for the given key. |
no test coverage detected