MCPcopy
hub / github.com/webpack/webpack / subtractRuntimeCondition

Function subtractRuntimeCondition

lib/util/runtime.js:409–415  ·  view source on GitHub ↗
(a, b, runtime)

Source from the content-addressed store, hash-verified

407 * @returns {RuntimeCondition} result
408 */
409const subtractRuntimeCondition = (a, b, runtime) => {
410 if (b === true) return false;
411 if (b === false) return a;
412 if (a === false) return false;
413 const result = subtractRuntime(a === true ? runtime : a, b);
414 return result === undefined ? false : result;
415};
416
417/**
418 * Returns true/false if filter is constant for all runtimes, otherwise runtimes that are active.

Callers 1

enterModuleMethod · 0.85

Calls 1

subtractRuntimeFunction · 0.85

Tested by

no test coverage detected