mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-06 01:47:48 +00:00
Bump to v4.13.1.
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import createFind from './_createFind.js';
|
||||
import findLastIndex from './findLastIndex.js';
|
||||
import isArrayLike from './isArrayLike.js';
|
||||
import values from './values.js';
|
||||
|
||||
/**
|
||||
* This method is like `_.find` except that it iterates over elements of
|
||||
@@ -22,10 +21,6 @@ import values from './values.js';
|
||||
* });
|
||||
* // => 3
|
||||
*/
|
||||
function findLast(collection, predicate, fromIndex) {
|
||||
collection = isArrayLike(collection) ? collection : values(collection);
|
||||
var index = findLastIndex(collection, predicate, fromIndex);
|
||||
return index > -1 ? collection[index] : undefined;
|
||||
}
|
||||
var findLast = createFind(findLastIndex);
|
||||
|
||||
export default findLast;
|
||||
|
||||
Reference in New Issue
Block a user