MCPcopy Index your code
hub / github.com/loiane/javascript-datastructures-algorithms / has

Method has

src/07-set/set.ts:50–52  ·  view source on GitHub ↗

* Returns true if the set contains the given value. * @param value - The value to check * @returns Whether the value is in the set * @complexity Time O(1) | Space O(1)

(value: string)

Source from the content-addressed store, hash-verified

48 * @complexity Time O(1) | Space O(1)
49 */
50 has(value: string): boolean {
51 return Object.prototype.hasOwnProperty.call(this.#items, value);
52 }
53
54 /**
55 * Returns an array of all values in the set.

Callers 15

addMethod · 0.95
deleteMethod · 0.95
isSupersetOfMethod · 0.95
translateWordFunction · 0.45
intersectionMethod · 0.45
differenceMethod · 0.45
isSubsetOfMethod · 0.45
set.test.tsFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected