MCPcopy Create free account
hub / github.com/PrairieLearn/PrairieLearn / iterator

Function iterator

public/javascripts/underscore.js:181–187  ·  view source on GitHub ↗
(obj, iteratee, memo, keys, index, length)

Source from the content-addressed store, hash-verified

179 // Optimized iterator function as using arguments.length
180 // in the main function will deoptimize the, see #1991.
181 function iterator(obj, iteratee, memo, keys, index, length) {
182 for (; index >= 0 && index < length; index += dir) {
183 var currentKey = keys ? keys[index] : index;
184 memo = iteratee(memo, obj[currentKey], currentKey, obj);
185 }
186 return memo;
187 }
188
189 return function(obj, iteratee, memo, context) {
190 iteratee = optimizeCb(iteratee, context, 4);

Callers 14

createReduceFunction · 0.70
_arrayEachFunction · 0.70
_mapFunction · 0.70
_reduceFunction · 0.70
_forEachOfFunction · 0.70
_withoutIndexFunction · 0.70
async.jsFile · 0.70
iterateFunction · 0.70
_eachOfLimitFunction · 0.70
_asyncMapFunction · 0.70
_filterFunction · 0.70
_rejectFunction · 0.70

Calls 1

iterateeFunction · 0.85

Tested by

no test coverage detected