diff --git a/at.js b/at.js index 8b98e291ea..a8b80227f2 100644 --- a/at.js +++ b/at.js @@ -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 diff --git a/attempt.js b/attempt.js index 8f792de798..ee6c482961 100644 --- a/attempt.js +++ b/attempt.js @@ -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) } diff --git a/capitalize.js b/capitalize.js index 46b11435bc..5b889d15c7 100644 --- a/capitalize.js +++ b/capitalize.js @@ -13,8 +13,7 @@ import upperFirst from './upperFirst.js' * capitalize('FRED') * // => 'Fred' */ -function capitalize(string) { - return upperFirst(string.toLowerCase()) -} +const capitalize = (string) => upperFirst(string.toLowerCase()) + export default capitalize diff --git a/cloneDeep.js b/cloneDeep.js index fad5ab0d03..a1f469eab0 100644 --- a/cloneDeep.js +++ b/cloneDeep.js @@ -20,8 +20,8 @@ const CLONE_SYMBOLS_FLAG = 4 * console.log(deep[0] === objects[0]) * // => false */ -function cloneDeep(value) { - return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG) +function cloneDeep(value) { + return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG) } export default cloneDeep pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy