MCPcopy Create free account
hub / github.com/denoland/std / deleteReverse

Method deleteReverse

data_structures/unstable_bidirectional_map.ts:179–183  ·  view source on GitHub ↗

* Removes the element with the specified value. If the element does not * exist, the instance remains unchanged. * * @param value The value of the element to remove. * @returns `true` if an element in the instance existed and has been removed, * or `false` if the element does not exis

(value: V)

Source from the content-addressed store, hash-verified

177 * ```
178 */
179 deleteReverse(value: V): boolean {
180 if (!this.#reverseMap.has(value)) return false;
181 const key = this.#reverseMap.get(value)!;
182 return super.delete(key) && this.#reverseMap.delete(value);
183 }
184
185 /**
186 * Checks if an element with the specified value exists.

Calls 3

hasMethod · 0.65
getMethod · 0.65
deleteMethod · 0.65

Tested by

no test coverage detected