MCPcopy
hub / github.com/webpack/webpack / _peek

Method _peek

lib/util/WeakTupleMap.js:222–233  ·  view source on GitHub ↗

* Returns the child node for a tuple element without creating one. * @param {ArrayElement<K>} thing thing * @returns {WeakTupleMap<K, V> | undefined} thing * @private

(thing)

Source from the content-addressed store, hash-verified

220 * @private
221 */
222 _peek(thing) {
223 if (isWeakKey(thing)) {
224 if ((this.f & 4) !== 4) return;
225 return /** @type {WeakMap<ArrayElement<K>, WeakTupleMap<K, V>>} */ (
226 this.w
227 ).get(thing);
228 }
229 if ((this.f & 2) !== 2) return;
230 return /** @type {Map<ArrayElement<K>, WeakTupleMap<K, V>>} */ (this.m).get(
231 thing
232 );
233 }
234
235 /**
236 * Returns the child node for a tuple element, creating and storing it when

Callers 3

hasMethod · 0.80
getMethod · 0.80
deleteMethod · 0.80

Calls 2

isWeakKeyFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected