mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-04 00:57:48 +00:00
Apply let/const transform.
This commit is contained in:
@@ -11,13 +11,13 @@ import keys from './keys.js';
|
||||
*/
|
||||
function createFind(findIndexFunc) {
|
||||
return (collection, predicate, fromIndex) => {
|
||||
var iterable = Object(collection);
|
||||
const iterable = Object(collection);
|
||||
if (!isArrayLike(collection)) {
|
||||
var iteratee = baseIteratee(predicate, 3);
|
||||
collection = keys(collection);
|
||||
predicate = key => iteratee(iterable[key], key, iterable);
|
||||
}
|
||||
var index = findIndexFunc(collection, predicate, fromIndex);
|
||||
const index = findIndexFunc(collection, predicate, fromIndex);
|
||||
return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user