MCPcopy
hub / github.com/webpack/webpack / countWithChildren

Function countWithChildren

lib/stats/DefaultStatsFactoryPlugin.js:426–434  ·  view source on GitHub ↗
(compilation, getItems)

Source from the content-addressed store, hash-verified

424 * @returns {number} total number
425 */
426const countWithChildren = (compilation, getItems) => {
427 let count = getItems(compilation, "").length;
428 for (const child of compilation.children) {
429 count += countWithChildren(child, (c, type) =>
430 getItems(c, `.children[].compilation${type}`)
431 );
432 }
433 return count;
434};
435
436/** @type {ExtractorsByOption<string | ErrorWithCause | AggregateError | WebpackError, StatsError>} */
437const EXTRACT_ERROR = {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected