MCPcopy
hub / github.com/webpack/webpack / addToMap

Method addToMap

lib/DefinePlugin.js:907–914  ·  lib/DefinePlugin.js::DefinePlugin.addToMap
(map, key, value)

Source from the content-addressed store, hash-verified

905 * @returns {void}
906 */
907 const addToMap = (map, key, value) => {
908 if (map.has(key)) {
909 /** @type {Set<string>} */
910 (map.get(key)).add(value);
911 } else {
912 map.set(key, new Set([value]));
913 }
914 };
915 for (const key of Object.keys(definitions)) {
916 const code = definitions[key];
917 if (

Callers

nothing calls this directly

Calls 4

hasMethod · 0.45
addMethod · 0.45
getMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected