MCPcopy
hub / github.com/webpack/webpack / _addInternal

Method _addInternal

lib/util/LazyBucketSortedSet.js:94–111  ·  view source on GitHub ↗

* Inserts an item into the correct nested bucket, creating intermediate * bucket structures on demand. * @param {K} key key of item * @param {T} item the item * @returns {void}

(key, item)

Source from the content-addressed store, hash-verified

92 * @returns {void}
93 */
94 _addInternal(key, item) {
95 let entry = this._map.get(key);
96 if (entry === undefined) {
97 entry = this._leaf
98 ? new SortableSet(
99 undefined,
100 /** @type {Comparator<T>} */
101 (this._innerArgs[0])
102 )
103 : new LazyBucketSortedSet(
104 .../** @type {[GetKey<T, K>, Comparator<K>]} */
105 (this._innerArgs)
106 );
107 this._keys.add(key);
108 this._map.set(key, entry);
109 }
110 entry.add(item);
111 }
112
113 /**
114 * Removes an item from either the unsorted staging area or its resolved

Callers 2

popFirstMethod · 0.95
startUpdateMethod · 0.95

Calls 3

getMethod · 0.45
addMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected