MCPcopy Index your code
hub / github.com/stemkoski/stemkoski.github.com / findLast

Function findLast

MathBox/mathbox-bundle.js:38386–38396  ·  view source on GitHub ↗

* This method is like `_.find` except that it iterates over elements * of a `collection` from right to left. * * @static * @memberOf _ * @category Collections * @param {Array|Object|string} collection The collection to iterate over. * @param {Function|Object|string

(collection, callback, thisArg)

Source from the content-addressed store, hash-verified

38384 * // => 3
38385 */
38386 function findLast(collection, callback, thisArg) {
38387 var result;
38388 callback = lodash.createCallback(callback, thisArg, 3);
38389 forEachRight(collection, function(value, index, collection) {
38390 if (callback(value, index, collection)) {
38391 result = value;
38392 return false;
38393 }
38394 });
38395 return result;
38396 }
38397
38398 /**
38399 * Iterates over elements of a collection, executing the callback for each

Callers

nothing calls this directly

Calls 2

forEachRightFunction · 0.85
callbackFunction · 0.70

Tested by

no test coverage detected