MCPcopy
hub / github.com/webpack/webpack / get

Method get

lib/util/WeakTupleMap.js:104–112  ·  view source on GitHub ↗

* Returns the value stored for the exact tuple key, if any. * @param {K} args tuple * @returns {V | undefined} the value

(...args)

Source from the content-addressed store, hash-verified

102 * @returns {V | undefined} the value
103 */
104 get(...args) {
105 /** @type {WeakTupleMap<K, V> | undefined} */
106 let node = this;
107 for (let i = 0; i < args.length; i++) {
108 node = node._peek(/** @type {ArrayElement<K>} */ (args[i]));
109 if (node === undefined) return;
110 }
111 return node._getValue();
112 }
113
114 /**
115 * Returns an existing value for the tuple or computes, stores, and returns a

Callers 3

_peekMethod · 0.45
_getMethod · 0.45

Calls 2

_peekMethod · 0.80
_getValueMethod · 0.80

Tested by

no test coverage detected