MCPcopy Create free account
hub / github.com/ajaxorg/ace-builds / arrayReduce

Function arrayReduce

src/worker-javascript.js:1670–1681  ·  view source on GitHub ↗
(array, iteratee, accumulator, initAccum)

Source from the content-addressed store, hash-verified

1668 return array;
1669}
1670function arrayReduce(array, iteratee, accumulator, initAccum) {
1671 var index = -1,
1672 length = array ? array.length : 0;
1673
1674 if (initAccum && length) {
1675 accumulator = array[++index];
1676 }
1677 while (++index < length) {
1678 accumulator = iteratee(accumulator, array[index], index, array);
1679 }
1680 return accumulator;
1681}
1682function baseTimes(n, iteratee) {
1683 var index = -1,
1684 result = Array(n);

Callers 2

cloneMapFunction · 0.70
cloneSetFunction · 0.70

Calls 1

iterateeFunction · 0.70

Tested by

no test coverage detected