MCPcopy
hub / github.com/requirejs/requirejs / each

Function each

require.js:55–64  ·  view source on GitHub ↗

* Helper function for iterating over an array. If the func returns * a true value, it will break out of the loop.

(ary, func)

Source from the content-addressed store, hash-verified

53 * a true value, it will break out of the loop.
54 */
55 function each(ary, func) {
56 if (ary) {
57 var i;
58 for (i = 0; i < ary.length; i += 1) {
59 if (ary[i] && func(ary[i], i, ary)) {
60 break;
61 }
62 }
63 }
64 }
65
66 /**
67 * Helper function for iterating over an array backwards. If the func

Callers 8

getGlobalFunction · 0.85
removeScriptFunction · 0.85
onErrorFunction · 0.85
takeGlobalQueueFunction · 0.85
breakCycleFunction · 0.85
checkLoadedFunction · 0.85
newContextFunction · 0.85
require.jsFile · 0.85

Calls 1

funcFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…