lint files (#4416)

* lint files

* added back arrow-paren and removed duplicate
This commit is contained in:
Phap Dinh
2019-08-17 13:44:54 -04:00
committed by John-David Dalton
parent 5b4dc54465
commit 15e1557b2a
10 changed files with 29 additions and 26 deletions

View File

@@ -17,16 +17,16 @@ import isArrayLike from './isArrayLike.js'
* findLast([1, 2, 3, 4], n => n % 2 == 1)
* // => 3
*/
function findLast (collection, predicate, fromIndex) {
function findLast(collection, predicate, fromIndex) {
let iteratee
const iterable = Object(collection)
if (!isArrayLike(collection)) {
collection = Object.keys(collection)
iteratee = predicate
predicate = key => iteratee(iterable[key], key, iterable)
predicate = (key) => iteratee(iterable[key], key, iterable)
}
const index = findLastIndex(collection, predicate, fromIndex)
return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;
return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined
}
export default findLast