MCPcopy
hub / github.com/webpack/webpack / arraySum

Function arraySum

lib/logging/truncateArgs.js:13–17  ·  view source on GitHub ↗
(array)

Source from the content-addressed store, hash-verified

11 * @returns {number} sum of all numbers in array
12 */
13const arraySum = (array) => {
14 let sum = 0;
15 for (const item of array) sum += item;
16 return sum;
17};
18
19/**
20 * Returns truncated args.

Callers 1

truncateArgsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected