MCPcopy
hub / github.com/webpack/webpack / forEachRuntime

Function forEachRuntime

lib/util/runtime.js:64–75  ·  lib/util/runtime.js::forEachRuntime
(runtime, fn, deterministicOrder = false)

Source from the content-addressed store, hash-verified

62 * @returns {void}
63 */
64const forEachRuntime = (runtime, fn, deterministicOrder = false) => {
65 if (runtime === undefined) {
66 fn(undefined);
67 } else if (typeof runtime === class="st">"string") {
68 fn(runtime);
69 } else {
70 if (deterministicOrder) runtime.sort();
71 for (const r of runtime) {
72 fn(r);
73 }
74 }
75};
76
77/**
78 * Returns runtime key.

Callers 6

applyMethod · 0.85
setUsedConditionallyMethod · 0.85
setUsedMethod · 0.85
hoistModulesInChunksMethod · 0.85

Calls 2

sortMethod · 0.80
fnFunction · 0.70

Tested by

no test coverage detected