CoolFace
Datasetpublic

basant307/AI_Governance_Project

sourceHugging Faceapache-2.0updated 2mo agoView on Hugging Face
0likes45downloads
findLast.js26 linesDownload Raw Back to lodash
1var createFind = require('./_createFind'),2    findLastIndex = require('./findLastIndex');3 4/**5 * This method is like `_.find` except that it iterates over elements of6 * `collection` from right to left.7 *8 * @static9 * @memberOf _10 * @since 2.0.011 * @category Collection12 * @param {Array|Object} collection The collection to inspect.13 * @param {Function} [predicate=_.identity] The function invoked per iteration.14 * @param {number} [fromIndex=collection.length-1] The index to search from.15 * @returns {*} Returns the matched element, else `undefined`.16 * @example17 *18 * _.findLast([1, 2, 3, 4], function(n) {19 *   return n % 2 == 1;20 * });21 * // => 322 */23var findLast = createFind(findLastIndex);24 25module.exports = findLast;26 
basant307/AI_Governance_Project · CoolFace