es-toolkit 1.23.0 → 1.24.0-dev.764

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.
Files changed (135) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/README.md +1 -1
  3. package/dist/_chunk/{isWeakSet-BAMm2l.js → isWeakSet-Bd6nry.js} +59 -46
  4. package/dist/_chunk/{range-BXlMmn.js → sumBy-BkErWJ.js} +25 -5
  5. package/dist/_chunk/{isObjectLike-aywuSF.js → toMerged-DDLv0D.js} +88 -86
  6. package/dist/_chunk/{flowRight-Dv8J0U.js → unary-BZ5Ixo.js} +27 -64
  7. package/dist/_chunk/{zipWith-EOU_KZ.js → zipWith-wpjySR.js} +8 -17
  8. package/dist/array/dropRightWhile.d.mts +2 -2
  9. package/dist/array/dropRightWhile.d.ts +2 -2
  10. package/dist/array/dropRightWhile.mjs +1 -1
  11. package/dist/array/dropWhile.d.mts +1 -1
  12. package/dist/array/dropWhile.d.ts +1 -1
  13. package/dist/array/index.js +1 -1
  14. package/dist/array/unionBy.mjs +3 -10
  15. package/dist/browser.global.js +1 -1
  16. package/dist/browser.global.js.map +1 -1
  17. package/dist/compat/_internal/MAX_ARRAY_LENGTH.mjs +3 -0
  18. package/dist/compat/_internal/isIterateeCall.mjs +17 -0
  19. package/dist/compat/array/difference.d.mts +9 -3
  20. package/dist/compat/array/difference.d.ts +9 -3
  21. package/dist/compat/array/difference.mjs +12 -3
  22. package/dist/compat/array/dropRightWhile.d.mts +60 -0
  23. package/dist/compat/array/dropRightWhile.d.ts +60 -0
  24. package/dist/compat/array/dropRightWhile.mjs +27 -0
  25. package/dist/compat/array/every.mjs +4 -5
  26. package/dist/compat/array/filter.mjs +4 -5
  27. package/dist/compat/array/find.mjs +4 -5
  28. package/dist/compat/array/includes.mjs +2 -1
  29. package/dist/compat/array/slice.d.mts +18 -0
  30. package/dist/compat/array/slice.d.ts +18 -0
  31. package/dist/compat/array/slice.mjs +38 -0
  32. package/dist/compat/array/take.d.mts +25 -0
  33. package/dist/compat/array/take.d.ts +25 -0
  34. package/dist/compat/array/take.mjs +10 -0
  35. package/dist/compat/function/before.d.mts +26 -0
  36. package/dist/compat/function/before.d.ts +26 -0
  37. package/dist/compat/function/before.mjs +20 -0
  38. package/dist/compat/function/curryRight.d.mts +50 -0
  39. package/dist/compat/function/curryRight.d.ts +50 -0
  40. package/dist/compat/function/curryRight.mjs +64 -0
  41. package/dist/compat/index.d.mts +86 -75
  42. package/dist/compat/index.d.ts +86 -75
  43. package/dist/compat/index.js +779 -496
  44. package/dist/compat/index.mjs +86 -75
  45. package/dist/compat/object/defaults.d.mts +120 -0
  46. package/dist/compat/object/defaults.d.ts +120 -0
  47. package/dist/compat/object/defaults.mjs +21 -0
  48. package/dist/compat/object/invertBy.d.mts +27 -0
  49. package/dist/compat/object/invertBy.d.ts +27 -0
  50. package/dist/compat/object/invertBy.mjs +27 -0
  51. package/dist/compat/object/omit.d.mts +1 -1
  52. package/dist/compat/object/omit.d.ts +1 -1
  53. package/dist/compat/object/pick.d.mts +1 -1
  54. package/dist/compat/object/pick.d.ts +1 -1
  55. package/dist/compat/object/toDefaulted.d.mts +122 -0
  56. package/dist/compat/object/toDefaulted.d.ts +122 -0
  57. package/dist/compat/object/toDefaulted.mjs +9 -0
  58. package/dist/compat/predicate/isArrayBuffer.d.mts +20 -0
  59. package/dist/compat/predicate/isArrayBuffer.d.ts +20 -0
  60. package/dist/compat/predicate/isArrayBuffer.mjs +7 -0
  61. package/dist/compat/predicate/isDate.d.mts +16 -0
  62. package/dist/compat/predicate/isDate.d.ts +16 -0
  63. package/dist/compat/predicate/isDate.mjs +7 -0
  64. package/dist/compat/predicate/isEqualWith.d.mts +38 -0
  65. package/dist/compat/predicate/isEqualWith.d.ts +38 -0
  66. package/dist/compat/predicate/isEqualWith.mjs +23 -0
  67. package/dist/compat/predicate/isMap.d.mts +20 -0
  68. package/dist/compat/predicate/isMap.d.ts +20 -0
  69. package/dist/compat/predicate/isMap.mjs +7 -0
  70. package/dist/compat/predicate/isMatch.mjs +2 -1
  71. package/dist/compat/predicate/isSet.d.mts +20 -0
  72. package/dist/compat/predicate/isSet.d.ts +20 -0
  73. package/dist/compat/predicate/isSet.mjs +7 -0
  74. package/dist/compat/string/upperCase.mjs +0 -1
  75. package/dist/compat/util/constant.d.mts +16 -0
  76. package/dist/compat/util/constant.d.ts +16 -0
  77. package/dist/compat/util/constant.mjs +5 -0
  78. package/dist/compat/util/defaultTo.d.mts +17 -0
  79. package/dist/compat/util/defaultTo.d.ts +17 -0
  80. package/dist/compat/util/defaultTo.mjs +8 -0
  81. package/dist/compat/util/eq.d.mts +16 -0
  82. package/dist/compat/util/eq.d.ts +16 -0
  83. package/dist/compat/util/eq.mjs +5 -0
  84. package/dist/compat/util/times.d.mts +14 -0
  85. package/dist/compat/util/times.d.ts +14 -0
  86. package/dist/compat/util/times.mjs +15 -0
  87. package/dist/compat/util/toLength.d.mts +18 -0
  88. package/dist/compat/util/toLength.d.ts +18 -0
  89. package/dist/compat/util/toLength.mjs +12 -0
  90. package/dist/function/before.d.mts +2 -2
  91. package/dist/function/before.d.ts +2 -2
  92. package/dist/function/before.mjs +2 -2
  93. package/dist/function/index.d.mts +10 -10
  94. package/dist/function/index.d.ts +10 -10
  95. package/dist/function/index.js +65 -32
  96. package/dist/function/index.mjs +10 -10
  97. package/dist/function/once.d.mts +16 -1
  98. package/dist/function/once.d.ts +16 -1
  99. package/dist/function/once.mjs +5 -7
  100. package/dist/index.d.mts +43 -41
  101. package/dist/index.d.ts +43 -41
  102. package/dist/index.js +59 -57
  103. package/dist/index.mjs +43 -41
  104. package/dist/math/index.d.mts +2 -1
  105. package/dist/math/index.d.ts +2 -1
  106. package/dist/math/index.js +9 -8
  107. package/dist/math/index.mjs +2 -1
  108. package/dist/math/rangeRight.d.mts +38 -0
  109. package/dist/math/rangeRight.d.ts +38 -0
  110. package/dist/math/rangeRight.mjs +20 -0
  111. package/dist/object/index.d.mts +7 -7
  112. package/dist/object/index.d.ts +7 -7
  113. package/dist/object/index.js +32 -32
  114. package/dist/object/index.mjs +7 -7
  115. package/dist/object/omitBy.d.mts +1 -1
  116. package/dist/object/omitBy.d.ts +1 -1
  117. package/dist/object/omitBy.mjs +4 -3
  118. package/dist/object/pickBy.mjs +4 -3
  119. package/dist/predicate/index.d.mts +11 -10
  120. package/dist/predicate/index.d.ts +11 -10
  121. package/dist/predicate/index.js +8 -7
  122. package/dist/predicate/index.mjs +11 -10
  123. package/dist/predicate/isBlob.d.mts +19 -0
  124. package/dist/predicate/isBlob.d.ts +19 -0
  125. package/dist/predicate/isBlob.mjs +8 -0
  126. package/dist/predicate/isEqualWith.mjs +2 -1
  127. package/dist/promise/index.d.mts +1 -1
  128. package/dist/promise/index.d.ts +1 -1
  129. package/dist/promise/index.mjs +1 -1
  130. package/dist/string/index.d.mts +12 -12
  131. package/dist/string/index.d.ts +12 -12
  132. package/dist/string/index.js +20 -20
  133. package/dist/string/index.mjs +12 -12
  134. package/package.json +10 -6
  135. package/dist/_chunk/{pad-BWiShN.js → upperFirst-BUECmK.js} +84 -84
@@ -2,27 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
 
5
- const isObjectLike = require('../_chunk/isObjectLike-aywuSF.js');
6
-
7
- function omit(obj, keys) {
8
- const result = { ...obj };
9
- for (let i = 0; i < keys.length; i++) {
10
- const key = keys[i];
11
- delete result[key];
12
- }
13
- return result;
14
- }
15
-
16
- function pick(obj, keys) {
17
- const result = {};
18
- for (let i = 0; i < keys.length; i++) {
19
- const key = keys[i];
20
- if (Object.hasOwn(obj, key)) {
21
- result[key] = obj[key];
22
- }
23
- }
24
- return result;
25
- }
5
+ const toMerged = require('../_chunk/toMerged-DDLv0D.js');
26
6
 
27
7
  function mergeWith(target, source, merge) {
28
8
  const sourceKeys = Object.keys(source);
@@ -37,7 +17,7 @@ function mergeWith(target, source, merge) {
37
17
  else if (Array.isArray(sourceValue)) {
38
18
  target[key] = mergeWith(targetValue ?? [], sourceValue, merge);
39
19
  }
40
- else if (isObjectLike.isObjectLike(targetValue) && isObjectLike.isObjectLike(sourceValue)) {
20
+ else if (toMerged.isObjectLike(targetValue) && toMerged.isObjectLike(sourceValue)) {
41
21
  target[key] = mergeWith(targetValue ?? {}, sourceValue, merge);
42
22
  }
43
23
  else if (targetValue === undefined || sourceValue !== undefined) {
@@ -47,16 +27,36 @@ function mergeWith(target, source, merge) {
47
27
  return target;
48
28
  }
49
29
 
50
- exports.clone = isObjectLike.clone;
51
- exports.cloneDeep = isObjectLike.cloneDeep;
52
- exports.flattenObject = isObjectLike.flattenObject;
53
- exports.invert = isObjectLike.invert;
54
- exports.mapKeys = isObjectLike.mapKeys;
55
- exports.mapValues = isObjectLike.mapValues;
56
- exports.merge = isObjectLike.merge;
57
- exports.omitBy = isObjectLike.omitBy;
58
- exports.pickBy = isObjectLike.pickBy;
59
- exports.toMerged = isObjectLike.toMerged;
30
+ function omit(obj, keys) {
31
+ const result = { ...obj };
32
+ for (let i = 0; i < keys.length; i++) {
33
+ const key = keys[i];
34
+ delete result[key];
35
+ }
36
+ return result;
37
+ }
38
+
39
+ function pick(obj, keys) {
40
+ const result = {};
41
+ for (let i = 0; i < keys.length; i++) {
42
+ const key = keys[i];
43
+ if (Object.hasOwn(obj, key)) {
44
+ result[key] = obj[key];
45
+ }
46
+ }
47
+ return result;
48
+ }
49
+
50
+ exports.clone = toMerged.clone;
51
+ exports.cloneDeep = toMerged.cloneDeep;
52
+ exports.flattenObject = toMerged.flattenObject;
53
+ exports.invert = toMerged.invert;
54
+ exports.mapKeys = toMerged.mapKeys;
55
+ exports.mapValues = toMerged.mapValues;
56
+ exports.merge = toMerged.merge;
57
+ exports.omitBy = toMerged.omitBy;
58
+ exports.pickBy = toMerged.pickBy;
59
+ exports.toMerged = toMerged.toMerged;
60
60
  exports.mergeWith = mergeWith;
61
61
  exports.omit = omit;
62
62
  exports.pick = pick;
@@ -1,13 +1,13 @@
1
- export { omit } from './omit.mjs';
2
- export { omitBy } from './omitBy.mjs';
3
- export { pick } from './pick.mjs';
4
- export { pickBy } from './pickBy.mjs';
5
- export { invert } from './invert.mjs';
6
1
  export { clone } from './clone.mjs';
2
+ export { cloneDeep } from './cloneDeep.mjs';
7
3
  export { flattenObject } from './flattenObject.mjs';
4
+ export { invert } from './invert.mjs';
8
5
  export { mapKeys } from './mapKeys.mjs';
9
6
  export { mapValues } from './mapValues.mjs';
10
- export { cloneDeep } from './cloneDeep.mjs';
11
7
  export { merge } from './merge.mjs';
12
- export { toMerged } from './toMerged.mjs';
13
8
  export { mergeWith } from './mergeWith.mjs';
9
+ export { omit } from './omit.mjs';
10
+ export { omitBy } from './omitBy.mjs';
11
+ export { pick } from './pick.mjs';
12
+ export { pickBy } from './pickBy.mjs';
13
+ export { toMerged } from './toMerged.mjs';
@@ -13,7 +13,7 @@
13
13
  *
14
14
  * @example
15
15
  * const obj = { a: 1, b: 'omit', c: 3 };
16
- * const shouldOmit = (key, value) => typeof value === 'string';
16
+ * const shouldOmit = (value) => typeof value === 'string';
17
17
  * const result = omitBy(obj, shouldOmit);
18
18
  * // result will be { a: 1, c: 3 }
19
19
  */
@@ -13,7 +13,7 @@
13
13
  *
14
14
  * @example
15
15
  * const obj = { a: 1, b: 'omit', c: 3 };
16
- * const shouldOmit = (key, value) => typeof value === 'string';
16
+ * const shouldOmit = (value) => typeof value === 'string';
17
17
  * const result = omitBy(obj, shouldOmit);
18
18
  * // result will be { a: 1, c: 3 }
19
19
  */
@@ -1,8 +1,9 @@
1
1
  function omitBy(obj, shouldOmit) {
2
2
  const result = {};
3
- const objEntries = Object.entries(obj);
4
- for (let i = 0; i < objEntries.length; i++) {
5
- const [key, value] = objEntries[i];
3
+ const keys = Object.keys(obj);
4
+ for (let i = 0; i < keys.length; i++) {
5
+ const key = keys[i];
6
+ const value = obj[key];
6
7
  if (!shouldOmit(value, key)) {
7
8
  result[key] = value;
8
9
  }
@@ -1,8 +1,9 @@
1
1
  function pickBy(obj, shouldPick) {
2
2
  const result = {};
3
- const objEntries = Object.entries(obj);
4
- for (let i = 0; i < objEntries.length; i++) {
5
- const [key, value] = objEntries[i];
3
+ const keys = Object.keys(obj);
4
+ for (let i = 0; i < keys.length; i++) {
5
+ const key = keys[i];
6
+ const value = obj[key];
6
7
  if (shouldPick(value, key)) {
7
8
  result[key] = value;
8
9
  }
@@ -1,25 +1,26 @@
1
1
  export { isArrayBuffer } from './isArrayBuffer.mjs';
2
+ export { isBlob } from './isBlob.mjs';
3
+ export { isBoolean } from './isBoolean.mjs';
2
4
  export { isDate } from './isDate.mjs';
3
5
  export { isEqual } from './isEqual.mjs';
4
6
  export { isEqualWith } from './isEqualWith.mjs';
5
7
  export { isError } from './isError.mjs';
8
+ export { isFunction } from './isFunction.mjs';
9
+ export { isJSONArray } from './isJSONArray.mjs';
10
+ export { isJSONObject } from './isJSONObject.mjs';
11
+ export { isJSONValue } from './isJSONValue.mjs';
12
+ export { isLength } from './isLength.mjs';
6
13
  export { isMap } from './isMap.mjs';
7
14
  export { isNil } from './isNil.mjs';
8
15
  export { isNotNil } from './isNotNil.mjs';
9
16
  export { isNull } from './isNull.mjs';
10
- export { isUndefined } from './isUndefined.mjs';
11
- export { isLength } from './isLength.mjs';
12
17
  export { isPlainObject } from './isPlainObject.mjs';
13
- export { isFunction } from './isFunction.mjs';
14
- export { isTypedArray } from './isTypedArray.mjs';
15
18
  export { isPrimitive } from './isPrimitive.mjs';
16
19
  export { isRegExp } from './isRegExp.mjs';
17
- export { isBoolean } from './isBoolean.mjs';
18
- export { isSymbol } from './isSymbol.mjs';
19
- export { isString } from './isString.mjs';
20
- export { isJSONObject } from './isJSONObject.mjs';
21
- export { isJSONValue } from './isJSONValue.mjs';
22
- export { isJSONArray } from './isJSONArray.mjs';
23
20
  export { isSet } from './isSet.mjs';
21
+ export { isString } from './isString.mjs';
22
+ export { isSymbol } from './isSymbol.mjs';
23
+ export { isTypedArray } from './isTypedArray.mjs';
24
+ export { isUndefined } from './isUndefined.mjs';
24
25
  export { isWeakMap } from './isWeakMap.mjs';
25
26
  export { isWeakSet } from './isWeakSet.mjs';
@@ -1,25 +1,26 @@
1
1
  export { isArrayBuffer } from './isArrayBuffer.js';
2
+ export { isBlob } from './isBlob.js';
3
+ export { isBoolean } from './isBoolean.js';
2
4
  export { isDate } from './isDate.js';
3
5
  export { isEqual } from './isEqual.js';
4
6
  export { isEqualWith } from './isEqualWith.js';
5
7
  export { isError } from './isError.js';
8
+ export { isFunction } from './isFunction.js';
9
+ export { isJSONArray } from './isJSONArray.js';
10
+ export { isJSONObject } from './isJSONObject.js';
11
+ export { isJSONValue } from './isJSONValue.js';
12
+ export { isLength } from './isLength.js';
6
13
  export { isMap } from './isMap.js';
7
14
  export { isNil } from './isNil.js';
8
15
  export { isNotNil } from './isNotNil.js';
9
16
  export { isNull } from './isNull.js';
10
- export { isUndefined } from './isUndefined.js';
11
- export { isLength } from './isLength.js';
12
17
  export { isPlainObject } from './isPlainObject.js';
13
- export { isFunction } from './isFunction.js';
14
- export { isTypedArray } from './isTypedArray.js';
15
18
  export { isPrimitive } from './isPrimitive.js';
16
19
  export { isRegExp } from './isRegExp.js';
17
- export { isBoolean } from './isBoolean.js';
18
- export { isSymbol } from './isSymbol.js';
19
- export { isString } from './isString.js';
20
- export { isJSONObject } from './isJSONObject.js';
21
- export { isJSONValue } from './isJSONValue.js';
22
- export { isJSONArray } from './isJSONArray.js';
23
20
  export { isSet } from './isSet.js';
21
+ export { isString } from './isString.js';
22
+ export { isSymbol } from './isSymbol.js';
23
+ export { isTypedArray } from './isTypedArray.js';
24
+ export { isUndefined } from './isUndefined.js';
24
25
  export { isWeakMap } from './isWeakMap.js';
25
26
  export { isWeakSet } from './isWeakSet.js';
@@ -2,26 +2,27 @@
2
2
 
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
 
5
- const isWeakSet = require('../_chunk/isWeakSet-BAMm2l.js');
5
+ const isWeakSet = require('../_chunk/isWeakSet-Bd6nry.js');
6
6
  const isPlainObject = require('../_chunk/isPlainObject-DgrsU7.js');
7
7
 
8
- function isError(value) {
9
- return value instanceof Error;
10
- }
11
-
12
8
  function isBoolean(x) {
13
9
  return typeof x === 'boolean';
14
10
  }
15
11
 
16
- function isSymbol(value) {
17
- return typeof value === 'symbol';
12
+ function isError(value) {
13
+ return value instanceof Error;
18
14
  }
19
15
 
20
16
  function isString(value) {
21
17
  return typeof value === 'string';
22
18
  }
23
19
 
20
+ function isSymbol(value) {
21
+ return typeof value === 'symbol';
22
+ }
23
+
24
24
  exports.isArrayBuffer = isWeakSet.isArrayBuffer;
25
+ exports.isBlob = isWeakSet.isBlob;
25
26
  exports.isDate = isWeakSet.isDate;
26
27
  exports.isEqual = isWeakSet.isEqual;
27
28
  exports.isEqualWith = isWeakSet.isEqualWith;
@@ -1,25 +1,26 @@
1
1
  export { isArrayBuffer } from './isArrayBuffer.mjs';
2
+ export { isBlob } from './isBlob.mjs';
3
+ export { isBoolean } from './isBoolean.mjs';
2
4
  export { isDate } from './isDate.mjs';
3
5
  export { isEqual } from './isEqual.mjs';
4
6
  export { isEqualWith } from './isEqualWith.mjs';
5
7
  export { isError } from './isError.mjs';
8
+ export { isFunction } from './isFunction.mjs';
9
+ export { isJSONArray } from './isJSONArray.mjs';
10
+ export { isJSONObject } from './isJSONObject.mjs';
11
+ export { isJSONValue } from './isJSONValue.mjs';
12
+ export { isLength } from './isLength.mjs';
6
13
  export { isMap } from './isMap.mjs';
7
14
  export { isNil } from './isNil.mjs';
8
15
  export { isNotNil } from './isNotNil.mjs';
9
16
  export { isNull } from './isNull.mjs';
10
- export { isUndefined } from './isUndefined.mjs';
11
- export { isLength } from './isLength.mjs';
12
17
  export { isPlainObject } from './isPlainObject.mjs';
13
- export { isFunction } from './isFunction.mjs';
14
- export { isTypedArray } from './isTypedArray.mjs';
15
18
  export { isPrimitive } from './isPrimitive.mjs';
16
19
  export { isRegExp } from './isRegExp.mjs';
17
- export { isBoolean } from './isBoolean.mjs';
18
- export { isSymbol } from './isSymbol.mjs';
19
- export { isString } from './isString.mjs';
20
- export { isJSONObject } from './isJSONObject.mjs';
21
- export { isJSONValue } from './isJSONValue.mjs';
22
- export { isJSONArray } from './isJSONArray.mjs';
23
20
  export { isSet } from './isSet.mjs';
21
+ export { isString } from './isString.mjs';
22
+ export { isSymbol } from './isSymbol.mjs';
23
+ export { isTypedArray } from './isTypedArray.mjs';
24
+ export { isUndefined } from './isUndefined.mjs';
24
25
  export { isWeakMap } from './isWeakMap.mjs';
25
26
  export { isWeakSet } from './isWeakSet.mjs';
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Checks if the given value is a Blob.
3
+ *
4
+ * This function tests whether the provided value is an instance of `Blob`.
5
+ * It returns `true` if the value is an instance of `Blob`, and `false` otherwise.
6
+ *
7
+ * @param {unknown} x - The value to test if it is a Blob.
8
+ * @returns {x is Blob} True if the value is a Blob, false otherwise.
9
+ *
10
+ * @example
11
+ * const value1 = new Blob();
12
+ * const value2 = {};
13
+ *
14
+ * console.log(isBlob(value1)); // true
15
+ * console.log(isBlob(value2)); // false
16
+ */
17
+ declare function isBlob(x: unknown): x is Blob;
18
+
19
+ export { isBlob };
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Checks if the given value is a Blob.
3
+ *
4
+ * This function tests whether the provided value is an instance of `Blob`.
5
+ * It returns `true` if the value is an instance of `Blob`, and `false` otherwise.
6
+ *
7
+ * @param {unknown} x - The value to test if it is a Blob.
8
+ * @returns {x is Blob} True if the value is a Blob, false otherwise.
9
+ *
10
+ * @example
11
+ * const value1 = new Blob();
12
+ * const value2 = {};
13
+ *
14
+ * console.log(isBlob(value1)); // true
15
+ * console.log(isBlob(value2)); // false
16
+ */
17
+ declare function isBlob(x: unknown): x is Blob;
18
+
19
+ export { isBlob };
@@ -0,0 +1,8 @@
1
+ function isBlob(x) {
2
+ if (typeof Blob === 'undefined') {
3
+ return false;
4
+ }
5
+ return x instanceof Blob;
6
+ }
7
+
8
+ export { isBlob };
@@ -2,6 +2,7 @@ import { isPlainObject } from './isPlainObject.mjs';
2
2
  import { getSymbols } from '../compat/_internal/getSymbols.mjs';
3
3
  import { getTag } from '../compat/_internal/getTag.mjs';
4
4
  import { functionTag, regexpTag, symbolTag, dateTag, booleanTag, numberTag, stringTag, objectTag, errorTag, dataViewTag, arrayBufferTag, float64ArrayTag, float32ArrayTag, bigInt64ArrayTag, int32ArrayTag, int16ArrayTag, int8ArrayTag, bigUint64ArrayTag, uint32ArrayTag, uint16ArrayTag, uint8ClampedArrayTag, uint8ArrayTag, arrayTag, setTag, mapTag, argumentsTag } from '../compat/_internal/tags.mjs';
5
+ import { eq } from '../compat/util/eq.mjs';
5
6
 
6
7
  function isEqualWith(a, b, areValuesEqual) {
7
8
  return isEqualWithImpl(a, b, undefined, undefined, undefined, undefined, areValuesEqual);
@@ -54,7 +55,7 @@ function areObjectsEqual(a, b, stack, areValuesEqual) {
54
55
  case numberTag: {
55
56
  const x = a.valueOf();
56
57
  const y = b.valueOf();
57
- return x === y || (Number.isNaN(x) && Number.isNaN(y));
58
+ return eq(x, y);
58
59
  }
59
60
  case booleanTag:
60
61
  case dateTag:
@@ -1,3 +1,3 @@
1
1
  export { delay } from './delay.mjs';
2
- export { withTimeout } from './withTimeout.mjs';
3
2
  export { timeout } from './timeout.mjs';
3
+ export { withTimeout } from './withTimeout.mjs';
@@ -1,3 +1,3 @@
1
1
  export { delay } from './delay.js';
2
- export { withTimeout } from './withTimeout.js';
3
2
  export { timeout } from './timeout.js';
3
+ export { withTimeout } from './withTimeout.js';
@@ -1,3 +1,3 @@
1
1
  export { delay } from './delay.mjs';
2
- export { withTimeout } from './withTimeout.mjs';
3
2
  export { timeout } from './timeout.mjs';
3
+ export { withTimeout } from './withTimeout.mjs';
@@ -1,19 +1,19 @@
1
1
  export { camelCase } from './camelCase.mjs';
2
- export { snakeCase } from './snakeCase.mjs';
3
- export { kebabCase } from './kebabCase.mjs';
4
- export { upperCase } from './upperCase.mjs';
5
- export { lowerCase } from './lowerCase.mjs';
6
- export { startCase } from './startCase.mjs';
7
2
  export { capitalize } from './capitalize.mjs';
8
- export { pascalCase } from './pascalCase.mjs';
9
3
  export { constantCase } from './constantCase.mjs';
10
- export { trim } from './trim.mjs';
11
- export { trimStart } from './trimStart.mjs';
12
- export { trimEnd } from './trimEnd.mjs';
13
- export { upperFirst } from './upperFirst.mjs';
14
- export { lowerFirst } from './lowerFirst.mjs';
15
4
  export { deburr } from './deburr.mjs';
16
5
  export { escape } from './escape.mjs';
17
6
  export { escapeRegExp } from './escapeRegExp.mjs';
18
- export { unescape } from './unescape.mjs';
7
+ export { kebabCase } from './kebabCase.mjs';
8
+ export { lowerCase } from './lowerCase.mjs';
9
+ export { lowerFirst } from './lowerFirst.mjs';
19
10
  export { pad } from './pad.mjs';
11
+ export { pascalCase } from './pascalCase.mjs';
12
+ export { snakeCase } from './snakeCase.mjs';
13
+ export { startCase } from './startCase.mjs';
14
+ export { trim } from './trim.mjs';
15
+ export { trimEnd } from './trimEnd.mjs';
16
+ export { trimStart } from './trimStart.mjs';
17
+ export { unescape } from './unescape.mjs';
18
+ export { upperCase } from './upperCase.mjs';
19
+ export { upperFirst } from './upperFirst.mjs';
@@ -1,19 +1,19 @@
1
1
  export { camelCase } from './camelCase.js';
2
- export { snakeCase } from './snakeCase.js';
3
- export { kebabCase } from './kebabCase.js';
4
- export { upperCase } from './upperCase.js';
5
- export { lowerCase } from './lowerCase.js';
6
- export { startCase } from './startCase.js';
7
2
  export { capitalize } from './capitalize.js';
8
- export { pascalCase } from './pascalCase.js';
9
3
  export { constantCase } from './constantCase.js';
10
- export { trim } from './trim.js';
11
- export { trimStart } from './trimStart.js';
12
- export { trimEnd } from './trimEnd.js';
13
- export { upperFirst } from './upperFirst.js';
14
- export { lowerFirst } from './lowerFirst.js';
15
4
  export { deburr } from './deburr.js';
16
5
  export { escape } from './escape.js';
17
6
  export { escapeRegExp } from './escapeRegExp.js';
18
- export { unescape } from './unescape.js';
7
+ export { kebabCase } from './kebabCase.js';
8
+ export { lowerCase } from './lowerCase.js';
9
+ export { lowerFirst } from './lowerFirst.js';
19
10
  export { pad } from './pad.js';
11
+ export { pascalCase } from './pascalCase.js';
12
+ export { snakeCase } from './snakeCase.js';
13
+ export { startCase } from './startCase.js';
14
+ export { trim } from './trim.js';
15
+ export { trimEnd } from './trimEnd.js';
16
+ export { trimStart } from './trimStart.js';
17
+ export { unescape } from './unescape.js';
18
+ export { upperCase } from './upperCase.js';
19
+ export { upperFirst } from './upperFirst.js';
@@ -2,10 +2,10 @@
2
2
 
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
 
5
- const pad = require('../_chunk/pad-BWiShN.js');
5
+ const upperFirst = require('../_chunk/upperFirst-BUECmK.js');
6
6
 
7
7
  function startCase(str) {
8
- const words = pad.getWords(str.trim());
8
+ const words = upperFirst.getWords(str.trim());
9
9
  let result = '';
10
10
  for (let i = 0; i < words.length; i++) {
11
11
  const word = words[i];
@@ -17,22 +17,22 @@ function startCase(str) {
17
17
  return result;
18
18
  }
19
19
 
20
- exports.camelCase = pad.camelCase;
21
- exports.capitalize = pad.capitalize;
22
- exports.constantCase = pad.constantCase;
23
- exports.deburr = pad.deburr;
24
- exports.escape = pad.escape;
25
- exports.escapeRegExp = pad.escapeRegExp;
26
- exports.kebabCase = pad.kebabCase;
27
- exports.lowerCase = pad.lowerCase;
28
- exports.lowerFirst = pad.lowerFirst;
29
- exports.pad = pad.pad;
30
- exports.pascalCase = pad.pascalCase;
31
- exports.snakeCase = pad.snakeCase;
32
- exports.trim = pad.trim;
33
- exports.trimEnd = pad.trimEnd;
34
- exports.trimStart = pad.trimStart;
35
- exports.unescape = pad.unescape;
36
- exports.upperCase = pad.upperCase;
37
- exports.upperFirst = pad.upperFirst;
20
+ exports.camelCase = upperFirst.camelCase;
21
+ exports.capitalize = upperFirst.capitalize;
22
+ exports.constantCase = upperFirst.constantCase;
23
+ exports.deburr = upperFirst.deburr;
24
+ exports.escape = upperFirst.escape;
25
+ exports.escapeRegExp = upperFirst.escapeRegExp;
26
+ exports.kebabCase = upperFirst.kebabCase;
27
+ exports.lowerCase = upperFirst.lowerCase;
28
+ exports.lowerFirst = upperFirst.lowerFirst;
29
+ exports.pad = upperFirst.pad;
30
+ exports.pascalCase = upperFirst.pascalCase;
31
+ exports.snakeCase = upperFirst.snakeCase;
32
+ exports.trim = upperFirst.trim;
33
+ exports.trimEnd = upperFirst.trimEnd;
34
+ exports.trimStart = upperFirst.trimStart;
35
+ exports.unescape = upperFirst.unescape;
36
+ exports.upperCase = upperFirst.upperCase;
37
+ exports.upperFirst = upperFirst.upperFirst;
38
38
  exports.startCase = startCase;
@@ -1,19 +1,19 @@
1
1
  export { camelCase } from './camelCase.mjs';
2
- export { snakeCase } from './snakeCase.mjs';
3
- export { kebabCase } from './kebabCase.mjs';
4
- export { upperCase } from './upperCase.mjs';
5
- export { lowerCase } from './lowerCase.mjs';
6
- export { startCase } from './startCase.mjs';
7
2
  export { capitalize } from './capitalize.mjs';
8
- export { pascalCase } from './pascalCase.mjs';
9
3
  export { constantCase } from './constantCase.mjs';
10
- export { trim } from './trim.mjs';
11
- export { trimStart } from './trimStart.mjs';
12
- export { trimEnd } from './trimEnd.mjs';
13
- export { upperFirst } from './upperFirst.mjs';
14
- export { lowerFirst } from './lowerFirst.mjs';
15
4
  export { deburr } from './deburr.mjs';
16
5
  export { escape } from './escape.mjs';
17
6
  export { escapeRegExp } from './escapeRegExp.mjs';
18
- export { unescape } from './unescape.mjs';
7
+ export { kebabCase } from './kebabCase.mjs';
8
+ export { lowerCase } from './lowerCase.mjs';
9
+ export { lowerFirst } from './lowerFirst.mjs';
19
10
  export { pad } from './pad.mjs';
11
+ export { pascalCase } from './pascalCase.mjs';
12
+ export { snakeCase } from './snakeCase.mjs';
13
+ export { startCase } from './startCase.mjs';
14
+ export { trim } from './trim.mjs';
15
+ export { trimEnd } from './trimEnd.mjs';
16
+ export { trimStart } from './trimStart.mjs';
17
+ export { unescape } from './unescape.mjs';
18
+ export { upperCase } from './upperCase.mjs';
19
+ export { upperFirst } from './upperFirst.mjs';
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.23.0",
4
+ "version": "1.24.0-dev.764+3638f2d0",
5
5
  "homepage": "https://es-toolkit.slash.page",
6
6
  "bugs": "https://github.com/toss/es-toolkit/issues",
7
7
  "repository": {
@@ -217,14 +217,14 @@
217
217
  "@changesets/cli": "^2.27.1",
218
218
  "@eslint/js": "^9.9.0",
219
219
  "@rollup/plugin-terser": "^0.4.4",
220
- "@rollup/plugin-typescript": "^11.1.6",
220
+ "@rollup/plugin-typescript": "^12.1.0",
221
221
  "@trivago/prettier-plugin-sort-imports": "^4.3.0",
222
222
  "@types/broken-link-checker": "^0",
223
223
  "@types/eslint": "^9",
224
- "@types/jscodeshift": "^0.11.11",
225
- "@types/node": "^20.12.11",
224
+ "@types/jscodeshift": "^0.12.0",
225
+ "@types/node": "^22.7.4",
226
226
  "@types/tar": "^6.1.13",
227
- "@vitest/coverage-istanbul": "^2.1.1",
227
+ "@vitest/coverage-istanbul": "^2.1.2",
228
228
  "@vue/compiler-sfc": "^3.5.10",
229
229
  "broken-link-checker": "^0.7.8",
230
230
  "eslint": "^9.9.0",
@@ -237,6 +237,7 @@
237
237
  "globals": "^15.9.0",
238
238
  "jscodeshift": "^17.0.0",
239
239
  "prettier": "^3.2.5",
240
+ "prettier-plugin-sort-re-exports": "^0.1.0",
240
241
  "rollup": "^4.19.0",
241
242
  "rollup-plugin-dts": "^6.1.1",
242
243
  "tar": "^6",
@@ -244,11 +245,14 @@
244
245
  "tsx": "^4.19.0",
245
246
  "typescript": "^5.4.5",
246
247
  "typescript-eslint": "^8.1.0",
247
- "vitest": "^2.1.1"
248
+ "vitest": "^2.1.2"
248
249
  },
249
250
  "dependenciesMeta": {
250
251
  "@trivago/prettier-plugin-sort-imports@4.3.0": {
251
252
  "unplugged": true
253
+ },
254
+ "prettier-plugin-sort-re-exports@0.0.1": {
255
+ "unplugged": true
252
256
  }
253
257
  },
254
258
  "sideEffects": false,