es-toolkit 1.14.0-dev.403 → 1.14.0-dev.405

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.
@@ -81,6 +81,7 @@ export { isUndefined } from '../predicate/isUndefined.mjs';
81
81
  export { isLength } from '../predicate/isLength.mjs';
82
82
  export { isFunction } from '../predicate/isFunction.mjs';
83
83
  export { isPrimitive } from '../predicate/isPrimitive.mjs';
84
+ export { isSymbol } from '../predicate/isSymbol.mjs';
84
85
  export { delay } from '../promise/delay.mjs';
85
86
  export { withTimeout } from '../promise/withTimeout.mjs';
86
87
  export { camelCase } from '../string/camelCase.mjs';
@@ -81,6 +81,7 @@ export { isUndefined } from '../predicate/isUndefined.js';
81
81
  export { isLength } from '../predicate/isLength.js';
82
82
  export { isFunction } from '../predicate/isFunction.js';
83
83
  export { isPrimitive } from '../predicate/isPrimitive.js';
84
+ export { isSymbol } from '../predicate/isSymbol.js';
84
85
  export { delay } from '../promise/delay.js';
85
86
  export { withTimeout } from '../promise/withTimeout.js';
86
87
  export { camelCase } from '../string/camelCase.js';
@@ -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 object_index = require('../object/index.js');
11
- const isFunction = require('../_chunk/isFunction-Cw_tLG.js');
11
+ const isSymbol = require('../_chunk/isSymbol-CyBIcg.js');
12
12
  const isTypedArray$1 = require('../_chunk/isTypedArray-BBEkFl.js');
13
13
  const string_index = require('../string/index.js');
14
14
 
@@ -79,7 +79,7 @@ function flattenDepth(value, depth = 1) {
79
79
  }
80
80
 
81
81
  function size(target) {
82
- if (isFunction.isNil(target)) {
82
+ if (isSymbol.isNil(target)) {
83
83
  return 0;
84
84
  }
85
85
  if (target instanceof Map || target instanceof Set) {
@@ -326,12 +326,12 @@ function isArray(value) {
326
326
  }
327
327
 
328
328
  function isArguments(value) {
329
- return value !== null && typeof value === 'object' && isFunction.getTag(value) === '[object Arguments]';
329
+ return value !== null && typeof value === 'object' && isSymbol.getTag(value) === '[object Arguments]';
330
330
  }
331
331
 
332
332
  function isArrayLike(value) {
333
333
  return value != null && typeof value !== "function" &&
334
- isFunction.isLength(value.length);
334
+ isSymbol.isLength(value.length);
335
335
  }
336
336
 
337
337
  function isObjectLike(value) {
@@ -342,7 +342,7 @@ function isBoolean(x) {
342
342
  if (x === true || x === false) {
343
343
  return true;
344
344
  }
345
- if (typeof x === 'object' && x != null && isFunction.getTag(x) === '[object Boolean]') {
345
+ if (typeof x === 'object' && x != null && isSymbol.getTag(x) === '[object Boolean]') {
346
346
  return true;
347
347
  }
348
348
  return false;
@@ -570,13 +570,14 @@ exports.omit = object_index.omit;
570
570
  exports.omitBy = object_index.omitBy;
571
571
  exports.pick = object_index.pick;
572
572
  exports.pickBy = object_index.pickBy;
573
- exports.isEqual = isFunction.isEqual;
574
- exports.isFunction = isFunction.isFunction;
575
- exports.isLength = isFunction.isLength;
576
- exports.isNil = isFunction.isNil;
577
- exports.isNotNil = isFunction.isNotNil;
578
- exports.isNull = isFunction.isNull;
579
- exports.isUndefined = isFunction.isUndefined;
573
+ exports.isEqual = isSymbol.isEqual;
574
+ exports.isFunction = isSymbol.isFunction;
575
+ exports.isLength = isSymbol.isLength;
576
+ exports.isNil = isSymbol.isNil;
577
+ exports.isNotNil = isSymbol.isNotNil;
578
+ exports.isNull = isSymbol.isNull;
579
+ exports.isSymbol = isSymbol.isSymbol;
580
+ exports.isUndefined = isSymbol.isUndefined;
580
581
  exports.isPrimitive = isTypedArray$1.isPrimitive;
581
582
  exports.camelCase = string_index.camelCase;
582
583
  exports.capitalize = string_index.capitalize;
@@ -81,6 +81,7 @@ export { isUndefined } from '../predicate/isUndefined.mjs';
81
81
  export { isLength } from '../predicate/isLength.mjs';
82
82
  export { isFunction } from '../predicate/isFunction.mjs';
83
83
  export { isPrimitive } from '../predicate/isPrimitive.mjs';
84
+ export { isSymbol } from '../predicate/isSymbol.mjs';
84
85
  export { delay } from '../promise/delay.mjs';
85
86
  export { withTimeout } from '../promise/withTimeout.mjs';
86
87
  export { camelCase } from '../string/camelCase.mjs';
package/dist/index.d.mts CHANGED
@@ -92,6 +92,7 @@ export { isFunction } from './predicate/isFunction.mjs';
92
92
  export { isTypedArray } from './predicate/isTypedArray.mjs';
93
93
  export { isPrimitive } from './predicate/isPrimitive.mjs';
94
94
  export { isBoolean } from './predicate/isBoolean.mjs';
95
+ export { isSymbol } from './predicate/isSymbol.mjs';
95
96
  export { delay } from './promise/delay.mjs';
96
97
  export { withTimeout } from './promise/withTimeout.mjs';
97
98
  export { camelCase } from './string/camelCase.mjs';
package/dist/index.d.ts CHANGED
@@ -92,6 +92,7 @@ export { isFunction } from './predicate/isFunction.js';
92
92
  export { isTypedArray } from './predicate/isTypedArray.js';
93
93
  export { isPrimitive } from './predicate/isPrimitive.js';
94
94
  export { isBoolean } from './predicate/isBoolean.js';
95
+ export { isSymbol } from './predicate/isSymbol.js';
95
96
  export { delay } from './promise/delay.js';
96
97
  export { withTimeout } from './promise/withTimeout.js';
97
98
  export { camelCase } from './string/camelCase.js';
package/dist/index.js CHANGED
@@ -9,7 +9,7 @@ const function_index = require('./function/index.js');
9
9
  const math_index = require('./math/index.js');
10
10
  const randomInt = require('./_chunk/randomInt-CF7bZK.js');
11
11
  const object_index = require('./object/index.js');
12
- const isFunction = require('./_chunk/isFunction-Cw_tLG.js');
12
+ const isSymbol = require('./_chunk/isSymbol-CyBIcg.js');
13
13
  const isTypedArray = require('./_chunk/isTypedArray-BBEkFl.js');
14
14
  const predicate_index = require('./predicate/index.js');
15
15
  const string_index = require('./string/index.js');
@@ -101,13 +101,14 @@ exports.omit = object_index.omit;
101
101
  exports.omitBy = object_index.omitBy;
102
102
  exports.pick = object_index.pick;
103
103
  exports.pickBy = object_index.pickBy;
104
- exports.isEqual = isFunction.isEqual;
105
- exports.isFunction = isFunction.isFunction;
106
- exports.isLength = isFunction.isLength;
107
- exports.isNil = isFunction.isNil;
108
- exports.isNotNil = isFunction.isNotNil;
109
- exports.isNull = isFunction.isNull;
110
- exports.isUndefined = isFunction.isUndefined;
104
+ exports.isEqual = isSymbol.isEqual;
105
+ exports.isFunction = isSymbol.isFunction;
106
+ exports.isLength = isSymbol.isLength;
107
+ exports.isNil = isSymbol.isNil;
108
+ exports.isNotNil = isSymbol.isNotNil;
109
+ exports.isNull = isSymbol.isNull;
110
+ exports.isSymbol = isSymbol.isSymbol;
111
+ exports.isUndefined = isSymbol.isUndefined;
111
112
  exports.isPlainObject = isTypedArray.isPlainObject;
112
113
  exports.isPrimitive = isTypedArray.isPrimitive;
113
114
  exports.isTypedArray = isTypedArray.isTypedArray;
package/dist/index.mjs CHANGED
@@ -92,6 +92,7 @@ export { isFunction } from './predicate/isFunction.mjs';
92
92
  export { isTypedArray } from './predicate/isTypedArray.mjs';
93
93
  export { isPrimitive } from './predicate/isPrimitive.mjs';
94
94
  export { isBoolean } from './predicate/isBoolean.mjs';
95
+ export { isSymbol } from './predicate/isSymbol.mjs';
95
96
  export { delay } from './promise/delay.mjs';
96
97
  export { withTimeout } from './promise/withTimeout.mjs';
97
98
  export { camelCase } from './string/camelCase.mjs';
@@ -9,3 +9,4 @@ export { isFunction } from './isFunction.mjs';
9
9
  export { isTypedArray } from './isTypedArray.mjs';
10
10
  export { isPrimitive } from './isPrimitive.mjs';
11
11
  export { isBoolean } from './isBoolean.mjs';
12
+ export { isSymbol } from './isSymbol.mjs';
@@ -9,3 +9,4 @@ export { isFunction } from './isFunction.js';
9
9
  export { isTypedArray } from './isTypedArray.js';
10
10
  export { isPrimitive } from './isPrimitive.js';
11
11
  export { isBoolean } from './isBoolean.js';
12
+ export { isSymbol } from './isSymbol.js';
@@ -2,20 +2,21 @@
2
2
 
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
 
5
- const isFunction = require('../_chunk/isFunction-Cw_tLG.js');
5
+ const isSymbol = require('../_chunk/isSymbol-CyBIcg.js');
6
6
  const isTypedArray = require('../_chunk/isTypedArray-BBEkFl.js');
7
7
 
8
8
  function isBoolean(x) {
9
9
  return typeof x === 'boolean';
10
10
  }
11
11
 
12
- exports.isEqual = isFunction.isEqual;
13
- exports.isFunction = isFunction.isFunction;
14
- exports.isLength = isFunction.isLength;
15
- exports.isNil = isFunction.isNil;
16
- exports.isNotNil = isFunction.isNotNil;
17
- exports.isNull = isFunction.isNull;
18
- exports.isUndefined = isFunction.isUndefined;
12
+ exports.isEqual = isSymbol.isEqual;
13
+ exports.isFunction = isSymbol.isFunction;
14
+ exports.isLength = isSymbol.isLength;
15
+ exports.isNil = isSymbol.isNil;
16
+ exports.isNotNil = isSymbol.isNotNil;
17
+ exports.isNull = isSymbol.isNull;
18
+ exports.isSymbol = isSymbol.isSymbol;
19
+ exports.isUndefined = isSymbol.isUndefined;
19
20
  exports.isPlainObject = isTypedArray.isPlainObject;
20
21
  exports.isPrimitive = isTypedArray.isPrimitive;
21
22
  exports.isTypedArray = isTypedArray.isTypedArray;
@@ -9,3 +9,4 @@ export { isFunction } from './isFunction.mjs';
9
9
  export { isTypedArray } from './isTypedArray.mjs';
10
10
  export { isPrimitive } from './isPrimitive.mjs';
11
11
  export { isBoolean } from './isBoolean.mjs';
12
+ export { isSymbol } from './isSymbol.mjs';
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Check whether a value is a symbol.
3
+ *
4
+ * This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to `symbol`.
5
+ *
6
+ * @param {unknown} value The value to check.
7
+ * @returns {value is symbol} Returns `true` if `value` is a symbol, else `false`.
8
+ */
9
+ declare function isSymbol(value: unknown): value is symbol;
10
+
11
+ export { isSymbol };
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Check whether a value is a symbol.
3
+ *
4
+ * This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to `symbol`.
5
+ *
6
+ * @param {unknown} value The value to check.
7
+ * @returns {value is symbol} Returns `true` if `value` is a symbol, else `false`.
8
+ */
9
+ declare function isSymbol(value: unknown): value is symbol;
10
+
11
+ export { isSymbol };
@@ -0,0 +1,5 @@
1
+ function isSymbol(value) {
2
+ return typeof value === 'symbol';
3
+ }
4
+
5
+ export { isSymbol };
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.14.0-dev.403+233682ac",
4
+ "version": "1.14.0-dev.405+4d46377d",
5
5
  "homepage": "https://es-toolkit.slash.page",
6
6
  "bugs": "https://github.com/toss/es-toolkit/issues",
7
7
  "repository": {