varbaseIteratee=require('./_baseIteratee'),isArrayLike=require('./isArrayLike'),keys=require('./keys');/** * Creates a `_.find` or `_.findLast` function. * * @private * @param {Function} findIndexFunc The function to find the collection index. * @returns {Function} Returns the new find function. */functioncreateFind(findIndexFunc){returnfunction(collection,predicate,fromIndex){variterable=Object(collection);if(!isArrayLike(collection)){variteratee=baseIteratee(predicate,3);collection=keys(collection);predicate=function(key){returniteratee(iterable[key],key,iterable);};}varindex=findIndexFunc(collection,predicate,fromIndex);returnindex>-1?iterable[iteratee?collection[index]:index]:undefined;};}module.exports=createFind;