MCPcopy Index your code
hub / github.com/SuperMap/iClient-JavaScript / reduce

Function reduce

libs/echarts/echarts.simple.js:585–598  ·  view source on GitHub ↗

* @memberOf module:zrender/core/util * @param {Array} obj * @param {Function} cb * @param {Object} [memo] * @param {*} [context] * @return {Array}

(obj, cb, memo, context)

Source from the content-addressed store, hash-verified

583 * @return {Array}
584 */
585function reduce(obj, cb, memo, context) {
586 if (!(obj && cb)) {
587 return;
588 }
589 if (obj.reduce && obj.reduce === nativeReduce) {
590 return obj.reduce(cb, memo, context);
591 }
592 else {
593 for (var i = 0, len = obj.length; i < len; i++) {
594 memo = cb.call(context, memo, obj[i], i, obj);
595 }
596 return memo;
597 }
598}
599
600/**
601 * 数组过滤

Callers 4

getPercentWithPrecisionFunction · 0.70
formatArrayValueFunction · 0.70
echarts.simple.jsFile · 0.70
mapv.jsFile · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected