mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-09 02:17:50 +00:00
Added arrow function in below files (#4061)
This commit is contained in:
committed by
John-David Dalton
parent
580cd4cd1b
commit
136d5253e7
4
at.js
4
at.js
@@ -15,8 +15,6 @@ import baseAt from './.internal/baseAt.js'
|
|||||||
* at(object, ['a[0].b.c', 'a[1]'])
|
* at(object, ['a[0].b.c', 'a[1]'])
|
||||||
* // => [3, 4]
|
* // => [3, 4]
|
||||||
*/
|
*/
|
||||||
function at(...paths) {
|
const at = (...paths) => baseAt(paths)
|
||||||
return baseAt(paths)
|
|
||||||
}
|
|
||||||
|
|
||||||
export default at
|
export default at
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ import isError from './isError.js'
|
|||||||
*/
|
*/
|
||||||
function attempt(func, ...args) {
|
function attempt(func, ...args) {
|
||||||
try {
|
try {
|
||||||
return func.apply(undefined, args)
|
return func(...args)
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return isError(e) ? e : new Error(e)
|
return isError(e) ? e : new Error(e)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user