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

Function each

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

Source from the content-addressed store, hash-verified

356 return typeof data.length === 'number';
357 }
358 function each(arr, cb, context) {
359 if (!(arr && cb)) {
360 return;
361 }
362 if (arr.forEach && arr.forEach === nativeForEach) {
363 arr.forEach(cb, context);
364 }
365 else if (arr.length === +arr.length) {
366 for (var i = 0, len = arr.length; i < len; i++) {
367 cb.call(context, arr[i], i, arr);
368 }
369 }
370 else {
371 for (var key in arr) {
372 if (arr.hasOwnProperty(key)) {
373 cb.call(context, arr[key], key, arr);
374 }
375 }
376 }
377 }
378 function map(arr, cb, context) {
379 if (!arr) {
380 return [];

Callers 15

HashMapFunction · 0.70
sample_echarts.jsFile · 0.70
mappingToExistsFunction · 0.70
mappingByIdFunction · 0.70
mappingByNameFunction · 0.70
mappingByIndexFunction · 0.70
mappingInReplaceAllModeFunction · 0.70
makeIdAndNameFunction · 0.70
preParseFinderFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…