MCPcopy
hub / github.com/webpack/webpack / _forEachLevel

Method _forEachLevel

lib/stats/StatsFactory.js:181–186  ·  view source on GitHub ↗

* Returns hook. * @template {StatsFactoryHooks[keyof StatsFactoryHooks]} HM * @template {HM extends HookMap<infer H> ? H : never} H * @template {H extends import("tapable").Hook<infer A, infer R> ? R : never} R * @param {HM} hookMap hook map * @param {Caches<H>} cache cache * @param {str

(hookMap, cache, type, fn)

Source from the content-addressed store, hash-verified

179 * @private
180 */
181 _forEachLevel(hookMap, cache, type, fn) {
182 for (const hook of this._getAllLevelHooks(hookMap, cache, type)) {
183 const result = fn(/** @type {H} */ (hook));
184 if (result !== undefined) return result;
185 }
186 }
187
188 /**
189 * For each level waterfall.

Callers 1

_createMethod · 0.95

Calls 2

_getAllLevelHooksMethod · 0.95
fnFunction · 0.50

Tested by

no test coverage detected