MCPcopy
hub / github.com/allmarkedup/purl / reduce

Function reduce

purl.js:174–183  ·  view source on GitHub ↗
(obj, accumulator)

Source from the content-addressed store, hash-verified

172 }
173
174 function reduce(obj, accumulator){
175 var i = 0,
176 l = obj.length >> 0,
177 curr = arguments[2];
178 while (i < l) {
179 if (i in obj) curr = accumulator.call(undefined, curr, obj[i], i, obj);
180 ++i;
181 }
182 return curr;
183 }
184
185 function isArray(vArg) {
186 return Object.prototype.toString.call(vArg) === "[object Array]";

Callers 1

parseStringFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…