MCPcopy
hub / github.com/webpack/webpack / popNewAssets

Method popNewAssets

lib/Compilation.js:619–632  ·  view source on GitHub ↗
(assets)

Source from the content-addressed store, hash-verified

617 * @returns {CompilationAssets} new assets
618 */
619 const popNewAssets = (assets) => {
620 /** @type {undefined | CompilationAssets} */
621 let newAssets;
622 for (const file of Object.keys(assets)) {
623 if (savedAssets.has(file)) continue;
624 if (newAssets === undefined) {
625 newAssets = Object.create(null);
626 }
627 /** @type {CompilationAssets} */
628 (newAssets)[file] = assets[file];
629 savedAssets.add(file);
630 }
631 return /** @type {CompilationAssets} */ (newAssets);
632 };
633 processAssetsHook.intercept({
634 name: "Compilation",
635 call: () => {

Callers

nothing calls this directly

Calls 4

keysMethod · 0.65
hasMethod · 0.45
createMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected