Added arrow function in below files (#4061)

This commit is contained in:
Saravyas
2018-11-18 09:03:35 +05:30
committed by John-David Dalton
parent 580cd4cd1b
commit 136d5253e7
2 changed files with 2 additions and 4 deletions

4
at.js
View File

@@ -15,8 +15,6 @@ import baseAt from './.internal/baseAt.js'
* at(object, ['a[0].b.c', 'a[1]'])
* // => [3, 4]
*/
function at(...paths) {
return baseAt(paths)
}
const at = (...paths) => baseAt(paths)
export default at

View File

@@ -21,7 +21,7 @@ import isError from './isError.js'
*/
function attempt(func, ...args) {
try {
return func.apply(undefined, args)
return func(...args)
} catch (e) {
return isError(e) ? e : new Error(e)
}