mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 15:57:48 +00:00
Bump to v3.6.0.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import baseCallback from '../internal/baseCallback';
|
||||
import createFindIndex from '../internal/createFindIndex';
|
||||
|
||||
/**
|
||||
* This method is like `_.findIndex` except that it iterates over elements
|
||||
@@ -48,15 +48,6 @@ import baseCallback from '../internal/baseCallback';
|
||||
* _.findLastIndex(users, 'active');
|
||||
* // => 0
|
||||
*/
|
||||
function findLastIndex(array, predicate, thisArg) {
|
||||
var length = array ? array.length : 0;
|
||||
predicate = baseCallback(predicate, thisArg, 3);
|
||||
while (length--) {
|
||||
if (predicate(array[length], length, array)) {
|
||||
return length;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
var findLastIndex = createFindIndex(true);
|
||||
|
||||
export default findLastIndex;
|
||||
|
||||
Reference in New Issue
Block a user