es-toolkit 1.15.1-dev.423 → 1.15.1-dev.424

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,5 @@
1
1
  function getSymbols(object) {
2
- return Object.getOwnPropertySymbols(object)
3
- .filter(symbol => object.propertyIsEnumerable(symbol));
2
+ return Object.getOwnPropertySymbols(object).filter(symbol => object.propertyIsEnumerable(symbol));
4
3
  }
5
4
 
6
5
  export { getSymbols };
@@ -6,6 +6,6 @@
6
6
  * @param {number} n - The arity cap.
7
7
  * @returns {(...args: any[]) => ReturnType<F>} Returns the new capped function.
8
8
  */
9
- declare function ary<F extends (...args: any[]) => any>(func: F, n?: number, guard?: unknown): ((...args: any[]) => ReturnType<F>);
9
+ declare function ary<F extends (...args: any[]) => any>(func: F, n?: number, guard?: unknown): (...args: any[]) => ReturnType<F>;
10
10
 
11
11
  export { ary };
@@ -6,6 +6,6 @@
6
6
  * @param {number} n - The arity cap.
7
7
  * @returns {(...args: any[]) => ReturnType<F>} Returns the new capped function.
8
8
  */
9
- declare function ary<F extends (...args: any[]) => any>(func: F, n?: number, guard?: unknown): ((...args: any[]) => ReturnType<F>);
9
+ declare function ary<F extends (...args: any[]) => any>(func: F, n?: number, guard?: unknown): (...args: any[]) => ReturnType<F>;
10
10
 
11
11
  export { ary };
@@ -8,7 +8,7 @@ const function_index = require('../function/index.js');
8
8
  const math_index = require('../math/index.js');
9
9
  const randomInt = require('../_chunk/randomInt-CF7bZK.js');
10
10
  const toMerged = require('../_chunk/toMerged-BGwYW5.js');
11
- const isFunction = require('../_chunk/isFunction-D0hq6d.js');
11
+ const isFunction = require('../_chunk/isFunction-DPic3X.js');
12
12
  const isTypedArray$1 = require('../_chunk/isTypedArray-BBEkFl.js');
13
13
  const string_index = require('../string/index.js');
14
14
 
@@ -229,11 +229,7 @@ function isIndex(value) {
229
229
  }
230
230
 
231
231
  function set(obj, path, value) {
232
- const resolvedPath = Array.isArray(path)
233
- ? path
234
- : typeof path === 'string'
235
- ? toPath(path)
236
- : [path];
232
+ const resolvedPath = Array.isArray(path) ? path : typeof path === 'string' ? toPath(path) : [path];
237
233
  let current = obj;
238
234
  for (let i = 0; i < resolvedPath.length - 1; i++) {
239
235
  const key = resolvedPath[i];
@@ -516,8 +512,7 @@ function isArray(value) {
516
512
  }
517
513
 
518
514
  function isArrayLike(value) {
519
- return value != null && typeof value !== "function" &&
520
- isFunction.isLength(value.length);
515
+ return value != null && typeof value !== 'function' && isFunction.isLength(value.length);
521
516
  }
522
517
 
523
518
  function isBoolean(x) {
@@ -2,11 +2,7 @@ import { isIndex } from '../_internal/isIndex.mjs';
2
2
  import { toPath } from '../_internal/toPath.mjs';
3
3
 
4
4
  function set(obj, path, value) {
5
- const resolvedPath = Array.isArray(path)
6
- ? path
7
- : typeof path === 'string'
8
- ? toPath(path)
9
- : [path];
5
+ const resolvedPath = Array.isArray(path) ? path : typeof path === 'string' ? toPath(path) : [path];
10
6
  let current = obj;
11
7
  for (let i = 0; i < resolvedPath.length - 1; i++) {
12
8
  const key = resolvedPath[i];
@@ -1,8 +1,7 @@
1
1
  import { isLength } from '../../predicate/isLength.mjs';
2
2
 
3
3
  function isArrayLike(value) {
4
- return value != null && typeof value !== "function" &&
5
- isLength(value.length);
4
+ return value != null && typeof value !== 'function' && isLength(value.length);
6
5
  }
7
6
 
8
7
  export { isArrayLike };
@@ -7,6 +7,6 @@
7
7
  * @param {any} guard - Enables use as an iteratee for methods like `map`.
8
8
  * @returns {(...args: any[]) => ReturnType<F>} Returns the new capped function.
9
9
  */
10
- declare function ary<F extends (...args: any[]) => any>(func: F, n: number): ((...args: any[]) => ReturnType<F>);
10
+ declare function ary<F extends (...args: any[]) => any>(func: F, n: number): (...args: any[]) => ReturnType<F>;
11
11
 
12
12
  export { ary };
@@ -7,6 +7,6 @@
7
7
  * @param {any} guard - Enables use as an iteratee for methods like `map`.
8
8
  * @returns {(...args: any[]) => ReturnType<F>} Returns the new capped function.
9
9
  */
10
- declare function ary<F extends (...args: any[]) => any>(func: F, n: number): ((...args: any[]) => ReturnType<F>);
10
+ declare function ary<F extends (...args: any[]) => any>(func: F, n: number): (...args: any[]) => ReturnType<F>;
11
11
 
12
12
  export { ary };
@@ -5,6 +5,6 @@
5
5
  * @param {F} func - The function to cap arguments for.
6
6
  * @returns {(...args: any[]) => ReturnType<F>} Returns the new capped function.
7
7
  */
8
- declare function unary<F extends (...args: any[]) => any>(func: F): ((...args: any[]) => ReturnType<F>);
8
+ declare function unary<F extends (...args: any[]) => any>(func: F): (...args: any[]) => ReturnType<F>;
9
9
 
10
10
  export { unary };
@@ -5,6 +5,6 @@
5
5
  * @param {F} func - The function to cap arguments for.
6
6
  * @returns {(...args: any[]) => ReturnType<F>} Returns the new capped function.
7
7
  */
8
- declare function unary<F extends (...args: any[]) => any>(func: F): ((...args: any[]) => ReturnType<F>);
8
+ declare function unary<F extends (...args: any[]) => any>(func: F): (...args: any[]) => ReturnType<F>;
9
9
 
10
10
  export { unary };
package/dist/index.js CHANGED
@@ -10,7 +10,7 @@ const math_index = require('./math/index.js');
10
10
  const randomInt = require('./_chunk/randomInt-CF7bZK.js');
11
11
  const toMerged = require('./_chunk/toMerged-BGwYW5.js');
12
12
  const object_index = require('./object/index.js');
13
- const isFunction = require('./_chunk/isFunction-D0hq6d.js');
13
+ const isFunction = require('./_chunk/isFunction-DPic3X.js');
14
14
  const isTypedArray = require('./_chunk/isTypedArray-BBEkFl.js');
15
15
  const predicate_index = require('./predicate/index.js');
16
16
  const string_index = require('./string/index.js');
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
 
5
- const isFunction = require('../_chunk/isFunction-D0hq6d.js');
5
+ const isFunction = require('../_chunk/isFunction-DPic3X.js');
6
6
  const isTypedArray = require('../_chunk/isTypedArray-BBEkFl.js');
7
7
 
8
8
  function isBoolean(x) {
@@ -47,7 +47,7 @@ function areObjectsEqual(a, b, stack) {
47
47
  case numberTag: {
48
48
  const x = a.valueOf();
49
49
  const y = b.valueOf();
50
- return x === y || Number.isNaN(x) && Number.isNaN(y);
50
+ return x === y || (Number.isNaN(x) && Number.isNaN(y));
51
51
  }
52
52
  case booleanTag:
53
53
  case dateTag:
@@ -140,8 +140,7 @@ function areObjectsEqual(a, b, stack) {
140
140
  return a.name === b.name && a.message === b.message;
141
141
  }
142
142
  case objectTag: {
143
- const areEqualInstances = areObjectsEqual(a.constructor, b.constructor, stack) ||
144
- (isPlainObject(a) && isPlainObject(b));
143
+ const areEqualInstances = areObjectsEqual(a.constructor, b.constructor, stack) || (isPlainObject(a) && isPlainObject(b));
145
144
  if (!areEqualInstances) {
146
145
  return false;
147
146
  }
@@ -4,10 +4,10 @@ import { getWords } from './_internal/getWords.mjs';
4
4
  function camelCase(str) {
5
5
  const words = getWords(str);
6
6
  if (words.length === 0) {
7
- return "";
7
+ return '';
8
8
  }
9
9
  const [first, ...rest] = words;
10
- return `${first.toLowerCase()}${rest.map((word) => capitalize(word)).join("")}`;
10
+ return `${first.toLowerCase()}${rest.map(word => capitalize(word)).join('')}`;
11
11
  }
12
12
 
13
13
  export { camelCase };
@@ -14,10 +14,10 @@ function getWords(str) {
14
14
  function camelCase(str) {
15
15
  const words = getWords(str);
16
16
  if (words.length === 0) {
17
- return "";
17
+ return '';
18
18
  }
19
19
  const [first, ...rest] = words;
20
- return `${first.toLowerCase()}${rest.map((word) => capitalize(word)).join("")}`;
20
+ return `${first.toLowerCase()}${rest.map(word => capitalize(word)).join('')}`;
21
21
  }
22
22
 
23
23
  const snakeCase = (str) => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "es-toolkit",
3
3
  "description": "A state-of-the-art, high-performance JavaScript utility library with a small bundle size and strong type annotations.",
4
- "version": "1.15.1-dev.423+5260d5b8",
4
+ "version": "1.15.1-dev.424+be4162dc",
5
5
  "homepage": "https://es-toolkit.slash.page",
6
6
  "bugs": "https://github.com/toss/es-toolkit/issues",
7
7
  "repository": {