MCPcopy
hub / github.com/webpack/webpack / addToMapOfItems

Function addToMapOfItems

lib/ids/IdHelpers.js:228–235  ·  view source on GitHub ↗
(map, key, value)

Source from the content-addressed store, hash-verified

226 * @returns {void}
227 */
228const addToMapOfItems = (map, key, value) => {
229 let array = map.get(key);
230 if (array === undefined) {
231 array = [];
232 map.set(key, array);
233 }
234 array.push(value);
235};
236
237/** @typedef {Set<string>} UsedModuleIds */
238

Callers 1

assignNamesFunction · 0.85

Calls 3

getMethod · 0.45
setMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected