MCPcopy
hub / github.com/webpack/webpack / has

Method has

lib/util/WeakTupleMap.js:89–97  ·  view source on GitHub ↗

* Checks whether the exact tuple key has a stored value. * @param {K} args tuple * @returns {boolean} true, if the tuple is in the Set

(...args)

Source from the content-addressed store, hash-verified

87 * @returns {boolean} true, if the tuple is in the Set
88 */
89 has(...args) {
90 /** @type {WeakTupleMap<K, V> | undefined} */
91 let node = this;
92 for (let i = 0; i < args.length; i++) {
93 node = node._peek(/** @type {ArrayElement<K>} */ (args[i]));
94 if (node === undefined) return false;
95 }
96 return node._hasValue();
97 }
98
99 /**
100 * Returns the value stored for the exact tuple key, if any.

Callers

nothing calls this directly

Calls 2

_peekMethod · 0.80
_hasValueMethod · 0.80

Tested by

no test coverage detected