MCPcopy
hub / github.com/tdewolff/minify / map

Function map

_benchmarks/sample_echarts.js:378–395  ·  view source on GitHub ↗
(arr, cb, context)

Source from the content-addressed store, hash-verified

376 }
377 }
378 function map(arr, cb, context) {
379 if (!arr) {
380 return [];
381 }
382 if (!cb) {
383 return slice(arr);
384 }
385 if (arr.map && arr.map === nativeMap) {
386 return arr.map(cb, context);
387 }
388 else {
389 var result = [];
390 for (var i = 0, len = arr.length; i < len; i++) {
391 result.push(cb.call(context, arr[i], i, arr));
392 }
393 return result;
394 }
395 }
396 function reduce(arr, cb, memo, context) {
397 if (!(arr && cb)) {
398 return;

Callers 15

sample_echarts.jsFile · 0.70
getPercentWithPrecisionFunction · 0.70
makePrintableFunction · 0.70
queryDataIndexFunction · 0.70
clipPointsByRectFunction · 0.70
getDependenciesFunction · 0.70
applySingleDataTransformFunction · 0.70
wrapInlineValueHTMLFunction · 0.70
seriesTaskResetFunction · 0.70
brushPathFunction · 0.70
brushTextFunction · 0.70

Calls 1

sliceFunction · 0.85

Tested by

no test coverage detected