es-toolkit 1.18.0-dev.584 → 1.18.0

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 (76) hide show
  1. package/dist/_chunk/{isWeakSet-Dob5v4.js → isWeakSet-CogETi.js} +3 -3
  2. package/dist/_chunk/{toMerged-LBvzaK.js → toMerged-DN1PPP.js} +37 -28
  3. package/dist/browser.global.js +1 -1
  4. package/dist/browser.global.js.map +1 -1
  5. package/dist/compat/_internal/toPath.mjs +10 -10
  6. package/dist/compat/index.d.mts +6 -12
  7. package/dist/compat/index.d.ts +6 -12
  8. package/dist/compat/index.js +30 -185
  9. package/dist/compat/index.mjs +6 -12
  10. package/dist/compat/predicate/isObject.d.mts +4 -4
  11. package/dist/compat/predicate/isObject.d.ts +4 -4
  12. package/dist/index.d.mts +0 -4
  13. package/dist/index.d.ts +0 -4
  14. package/dist/index.js +16 -21
  15. package/dist/index.mjs +0 -4
  16. package/dist/math/index.js +66 -8
  17. package/dist/object/clone.mjs +25 -28
  18. package/dist/object/index.js +2 -10
  19. package/dist/predicate/index.js +5 -5
  20. package/dist/predicate/isNotNil.mjs +1 -1
  21. package/dist/string/index.d.mts +0 -4
  22. package/dist/string/index.d.ts +0 -4
  23. package/dist/string/index.js +0 -65
  24. package/dist/string/index.mjs +0 -4
  25. package/dist/string/startCase.d.mts +1 -1
  26. package/dist/string/startCase.d.ts +1 -1
  27. package/package.json +1 -1
  28. package/dist/_chunk/range-BXlMmn.js +0 -68
  29. package/dist/compat/_internal/decimalAdjust.mjs +0 -19
  30. package/dist/compat/math/ceil.d.mts +0 -15
  31. package/dist/compat/math/ceil.d.ts +0 -15
  32. package/dist/compat/math/ceil.mjs +0 -7
  33. package/dist/compat/math/floor.d.mts +0 -15
  34. package/dist/compat/math/floor.d.ts +0 -15
  35. package/dist/compat/math/floor.mjs +0 -7
  36. package/dist/compat/math/round.d.mts +0 -15
  37. package/dist/compat/math/round.d.ts +0 -15
  38. package/dist/compat/math/round.mjs +0 -7
  39. package/dist/compat/object/pick.d.mts +0 -46
  40. package/dist/compat/object/pick.d.ts +0 -46
  41. package/dist/compat/object/pick.mjs +0 -38
  42. package/dist/compat/predicate/isNil.mjs +0 -5
  43. package/dist/compat/string/kebabCase.d.mts +0 -17
  44. package/dist/compat/string/kebabCase.d.ts +0 -17
  45. package/dist/compat/string/kebabCase.mjs +0 -9
  46. package/dist/compat/string/lowerCase.d.mts +0 -17
  47. package/dist/compat/string/lowerCase.d.ts +0 -17
  48. package/dist/compat/string/lowerCase.mjs +0 -8
  49. package/dist/compat/string/snakeCase.d.mts +0 -17
  50. package/dist/compat/string/snakeCase.d.ts +0 -17
  51. package/dist/compat/string/snakeCase.mjs +0 -8
  52. package/dist/compat/string/startCase.d.mts +0 -16
  53. package/dist/compat/string/startCase.d.ts +0 -16
  54. package/dist/compat/string/startCase.mjs +0 -8
  55. package/dist/compat/string/trim.d.mts +0 -15
  56. package/dist/compat/string/trim.d.ts +0 -15
  57. package/dist/compat/string/trim.mjs +0 -25
  58. package/dist/compat/string/trimEnd.d.mts +0 -16
  59. package/dist/compat/string/trimEnd.d.ts +0 -16
  60. package/dist/compat/string/trimEnd.mjs +0 -25
  61. package/dist/compat/string/trimStart.d.mts +0 -16
  62. package/dist/compat/string/trimStart.d.ts +0 -16
  63. package/dist/compat/string/trimStart.mjs +0 -25
  64. package/dist/string/trim.d.mts +0 -15
  65. package/dist/string/trim.d.ts +0 -15
  66. package/dist/string/trim.mjs +0 -11
  67. package/dist/string/trimEnd.d.mts +0 -16
  68. package/dist/string/trimEnd.d.ts +0 -16
  69. package/dist/string/trimEnd.mjs +0 -22
  70. package/dist/string/trimStart.d.mts +0 -16
  71. package/dist/string/trimStart.d.ts +0 -16
  72. package/dist/string/trimStart.mjs +0 -22
  73. package/dist/string/upperCase.d.mts +0 -17
  74. package/dist/string/upperCase.d.ts +0 -17
  75. package/dist/string/upperCase.mjs +0 -15
  76. package/dist/_chunk/{isPlainObject-BIekvL.js → isTypedArray-Dsrnb1.js} +8 -8
@@ -1,17 +0,0 @@
1
- /**
2
- * Converts a string to upper case.
3
- *
4
- * Upper case is the naming convention in which each word is written in uppercase and separated by an space ( ) character.
5
- *
6
- * @param {string} str - The string that is to be changed to upper case.
7
- * @returns {string} - The converted string to upper case.
8
- *
9
- * @example
10
- * const convertedStr1 = upperCase('camelCase') // returns 'CAMEL CASE'
11
- * const convertedStr2 = upperCase('some whitespace') // returns 'SOME WHITESPACE'
12
- * const convertedStr3 = upperCase('hyphen-text') // returns 'HYPHEN TEXT'
13
- * const convertedStr4 = upperCase('HTTPRequest') // returns 'HTTP REQUEST'
14
- */
15
- declare function upperCase(str: string): string;
16
-
17
- export { upperCase };
@@ -1,15 +0,0 @@
1
- import { getWords } from './_internal/getWords.mjs';
2
-
3
- function upperCase(str) {
4
- const words = getWords(str);
5
- let result = '';
6
- for (let i = 0; i < words.length; i++) {
7
- result += words[i].toUpperCase();
8
- if (i < words.length - 1) {
9
- result += ' ';
10
- }
11
- }
12
- return result;
13
- }
14
-
15
- export { upperCase };
@@ -1,13 +1,5 @@
1
1
  'use strict';
2
2
 
3
- function isTypedArray(x) {
4
- return ArrayBuffer.isView(x) && !(x instanceof DataView);
5
- }
6
-
7
- function isPrimitive(value) {
8
- return value == null || (typeof value !== 'object' && typeof value !== 'function');
9
- }
10
-
11
3
  function isPlainObject(object) {
12
4
  if (typeof object !== 'object') {
13
5
  return false;
@@ -28,6 +20,14 @@ function isPlainObject(object) {
28
20
  return Object.getPrototypeOf(object) === proto;
29
21
  }
30
22
 
23
+ function isPrimitive(value) {
24
+ return value == null || (typeof value !== 'object' && typeof value !== 'function');
25
+ }
26
+
27
+ function isTypedArray(x) {
28
+ return ArrayBuffer.isView(x) && !(x instanceof DataView);
29
+ }
30
+
31
31
  exports.isPlainObject = isPlainObject;
32
32
  exports.isPrimitive = isPrimitive;
33
33
  exports.isTypedArray = isTypedArray;