MCPcopy Index your code
hub / github.com/deployd/deployd / reduce

Function reduce

test-app/public/sinon.js:20304–20309  ·  view source on GitHub ↗

* Reduces `collection` to a value which is the accumulated result of running * each element in `collection` thru `iteratee`, where each successive * invocation is supplied the return value of the previous. If `accumulator` * is not given, the first element of `collection`

(collection, iteratee, accumulator)

Source from the content-addressed store, hash-verified

20302 * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)
20303 */
20304 function reduce(collection, iteratee, accumulator) {
20305 var func = isArray(collection) ? arrayReduce : baseReduce,
20306 initAccum = arguments.length < 3;
20307
20308 return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);
20309 }
20310
20311 /**
20312 * This method is like `_.reduce` except that it iterates over elements of

Callers 1

sinon.jsFile · 0.85

Calls 2

getIterateeFunction · 0.85
isArrayFunction · 0.70

Tested by

no test coverage detected