MCPcopy
hub / github.com/webpack/webpack / mergeAssets

Function mergeAssets

lib/CleanPlugin.js:46–51  ·  view source on GitHub ↗
(as1, as2)

Source from the content-addressed store, hash-verified

44 * @returns {void}
45 */
46const mergeAssets = (as1, as2) => {
47 for (const [key, value1] of as2) {
48 const value2 = as1.get(key);
49 if (!value2 || value1 > value2) as1.set(key, value1);
50 }
51};
52
53/** @typedef {Map<string, number>} CurrentAssets */
54

Callers 1

diffCallbackMethod · 0.85

Calls 2

getMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected