Apply let/const transform.

This commit is contained in:
John-David Dalton
2017-01-07 23:18:22 -08:00
parent 4c881b2726
commit 10f64ee9c4
103 changed files with 207 additions and 207 deletions

View File

@@ -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;
};
}