MCPcopy
hub / github.com/webpack/webpack / set

Method set

lib/util/WeakTupleMap.js:75–82  ·  view source on GitHub ↗

* Stores a value at the node identified by the provided tuple key. * @param {[...K, V]} args tuple * @returns {void}

(...args)

Source from the content-addressed store, hash-verified

73 * @returns {void}
74 */
75 set(...args) {
76 /** @type {WeakTupleMap<K, V>} */
77 let node = this;
78 for (let i = 0; i < args.length - 1; i++) {
79 node = node._get(/** @type {ArrayElement<K>} */ (args[i]));
80 }
81 node._setValue(/** @type {V} */ (args[args.length - 1]));
82 }
83
84 /**
85 * Checks whether the exact tuple key has a stored value.

Callers 2

_getMethod · 0.45

Calls 2

_getMethod · 0.80
_setValueMethod · 0.80

Tested by

no test coverage detected