MCPcopy Create free account
hub / github.com/ActiveState/code / sum_

Function sum_

recipes/JavaScript/579002_BaderOffer_Method/recipe-579002.js:235–239  ·  view source on GitHub ↗
(arr, key)

Source from the content-addressed store, hash-verified

233};
234
235function sum_(arr, key) {
236 if (!arr.length)
237 return 0;
238 return arr.map(key_(key)).reduce(function(a, b) { return a + b });
239}

Callers 3

get_agreement_list_Function · 0.85
mandate_splitting_Function · 0.85
recipe-579002.jsFile · 0.85

Calls 3

key_Function · 0.85
reduceMethod · 0.45
mapMethod · 0.45

Tested by

no test coverage detected