MCPcopy
hub / github.com/requirejs/requirejs / eachReverse

Function eachReverse

require.js:70–79  ·  view source on GitHub ↗

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

(ary, func)

Source from the content-addressed store, hash-verified

68 * returns a true value, it will break out of the loop.
69 */
70 function eachReverse(ary, func) {
71 if (ary) {
72 var i;
73 for (i = ary.length - 1; i > -1; i -= 1) {
74 if (ary[i] && func(ary[i], i, ary)) {
75 break;
76 }
77 }
78 }
79 }
80
81 function hasProp(obj, prop) {
82 return hasOwn.call(obj, prop);

Callers 3

newContextFunction · 0.85
getInteractiveScriptFunction · 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…