MCPcopy
hub / github.com/webpack/webpack / getDiffToOldAssets

Function getDiffToOldAssets

lib/CleanPlugin.js:137–146  ·  view source on GitHub ↗
(currentAssets, oldAssets)

Source from the content-addressed store, hash-verified

135 * @returns {Diff} diff
136 */
137const getDiffToOldAssets = (currentAssets, oldAssets) => {
138 /** @type {Diff} */
139 const diff = new Set();
140 const now = Date.now();
141 for (const [asset, ts] of oldAssets) {
142 if (ts >= now) continue;
143 if (!currentAssets.has(asset)) diff.add(asset);
144 }
145 return diff;
146};
147
148/**
149 * Processes the provided f.

Callers 1

applyMethod · 0.85

Calls 2

hasMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected