MCPcopy
hub / github.com/webpack/webpack / sumSize

Function sumSize

lib/util/deterministicGrouping.js:108–115  ·  view source on GitHub ↗
(nodes, start)

Source from the content-addressed store, hash-verified

106 * @returns {Sizes} total size
107 */
108const sumSize = (nodes, start) => {
109 /** @type {Sizes} */
110 const sum = Object.create(null);
111 for (let i = start || 0; i < nodes.length; i++) {
112 addSizeTo(sum, nodes[i].size);
113 }
114 return sum;
115};
116
117/**
118 * Checks whether this object is too big.

Callers 3

constructorMethod · 0.85
popNodesMethod · 0.85

Calls 2

addSizeToFunction · 0.85
createMethod · 0.45

Tested by

no test coverage detected