es-toolkit 1.19.0-dev.619 → 1.19.0-dev.621

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 (47) hide show
  1. package/dist/_chunk/{isNumber-CM_Bs0.js → isWeakSet-E_VMwB.js} +0 -10
  2. package/dist/browser.global.js +1 -1
  3. package/dist/browser.global.js.map +1 -1
  4. package/dist/compat/array/findLastIndex.mjs +8 -8
  5. package/dist/compat/array/some.d.mts +0 -1
  6. package/dist/compat/array/some.d.ts +0 -1
  7. package/dist/compat/function/throttle.d.mts +30 -0
  8. package/dist/compat/function/throttle.d.ts +30 -0
  9. package/dist/compat/index.d.mts +3 -3
  10. package/dist/compat/index.d.ts +3 -3
  11. package/dist/compat/index.js +48 -33
  12. package/dist/compat/index.mjs +3 -3
  13. package/dist/{predicate → compat/predicate}/isNumber.d.mts +1 -1
  14. package/dist/{predicate → compat/predicate}/isNumber.d.ts +1 -1
  15. package/dist/compat/predicate/isNumber.mjs +10 -0
  16. package/dist/compat/string/camelCase.d.mts +1 -1
  17. package/dist/compat/string/camelCase.d.ts +1 -1
  18. package/dist/compat/string/kebabCase.d.mts +2 -2
  19. package/dist/compat/string/kebabCase.d.ts +2 -2
  20. package/dist/compat/string/lowerCase.d.mts +2 -2
  21. package/dist/compat/string/lowerCase.d.ts +2 -2
  22. package/dist/compat/string/snakeCase.d.mts +2 -2
  23. package/dist/compat/string/snakeCase.d.ts +2 -2
  24. package/dist/compat/string/startCase.d.mts +2 -2
  25. package/dist/compat/string/startCase.d.ts +2 -2
  26. package/dist/compat/string/trim.d.mts +0 -1
  27. package/dist/compat/string/trim.d.ts +0 -1
  28. package/dist/compat/string/trimEnd.d.mts +0 -1
  29. package/dist/compat/string/trimEnd.d.ts +0 -1
  30. package/dist/compat/string/trimStart.d.mts +0 -1
  31. package/dist/compat/string/trimStart.d.ts +0 -1
  32. package/dist/compat/string/upperCase.d.mts +17 -0
  33. package/dist/compat/string/upperCase.d.ts +17 -0
  34. package/dist/compat/string/upperCase.mjs +9 -0
  35. package/dist/index.d.mts +0 -2
  36. package/dist/index.d.ts +0 -2
  37. package/dist/index.js +11 -13
  38. package/dist/index.mjs +0 -2
  39. package/dist/predicate/index.d.mts +0 -2
  40. package/dist/predicate/index.d.ts +0 -2
  41. package/dist/predicate/index.js +11 -13
  42. package/dist/predicate/index.mjs +0 -2
  43. package/package.json +1 -1
  44. package/dist/predicate/isNumber.mjs +0 -5
  45. /package/dist/{predicate → compat/predicate}/isNaN.d.mts +0 -0
  46. /package/dist/{predicate → compat/predicate}/isNaN.d.ts +0 -0
  47. /package/dist/{predicate → compat/predicate}/isNaN.mjs +0 -0
@@ -3,7 +3,6 @@
3
3
  *
4
4
  * @param {string} str - The string from which leading and trailing characters will be trimmed.
5
5
  * @param {string | string[]} chars - The character(s) to remove from the end of the string. Defaults to `" "`.
6
- * @param guard
7
6
  * @returns {string} - The resulting string after the specified leading and trailing characters have been removed.
8
7
  *
9
8
  * @example
@@ -3,7 +3,6 @@
3
3
  *
4
4
  * @param {string} str - The string from which trailing characters will be trimmed.
5
5
  * @param {string | string[]} chars - The character(s) to remove from the end of the string. Defaults to `" "`.
6
- * @param guard
7
6
  * @returns {string} - The resulting string after the specified trailing character has been removed.
8
7
  *
9
8
  * @example
@@ -3,7 +3,6 @@
3
3
  *
4
4
  * @param {string} str - The string from which trailing characters will be trimmed.
5
5
  * @param {string | string[]} chars - The character(s) to remove from the end of the string. Defaults to `" "`.
6
- * @param guard
7
6
  * @returns {string} - The resulting string after the specified trailing character has been removed.
8
7
  *
9
8
  * @example
@@ -3,7 +3,6 @@
3
3
  *
4
4
  * @param {string} str - The string from which leading characters will be trimmed.
5
5
  * @param {string | string[]} chars - The character(s) to remove from the end of the string. Defaults to `" "`.
6
- * @param guard
7
6
  * @returns {string} - The resulting string after the specified leading character has been removed.
8
7
  *
9
8
  * @example
@@ -3,7 +3,6 @@
3
3
  *
4
4
  * @param {string} str - The string from which leading characters will be trimmed.
5
5
  * @param {string | string[]} chars - The character(s) to remove from the end of the string. Defaults to `" "`.
6
- * @param guard
7
6
  * @returns {string} - The resulting string after the specified leading character has been removed.
8
7
  *
9
8
  * @example
@@ -0,0 +1,17 @@
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 | object} 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 | object): string;
16
+
17
+ export { upperCase };
@@ -0,0 +1,17 @@
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 | object} 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 | object): string;
16
+
17
+ export { upperCase };
@@ -0,0 +1,9 @@
1
+ import { upperCase as upperCase$1 } from '../../string/upperCase.mjs';
2
+ import '../../string/deburr.mjs';
3
+ import { normalizeForCase } from '../_internal/normalizeForCase.mjs';
4
+
5
+ function upperCase(str) {
6
+ return upperCase$1(normalizeForCase(str));
7
+ }
8
+
9
+ export { upperCase };
package/dist/index.d.mts CHANGED
@@ -96,7 +96,6 @@ export { toMerged } from './object/toMerged.mjs';
96
96
  export { mergeWith } from './object/mergeWith.mjs';
97
97
  export { isDate } from './predicate/isDate.mjs';
98
98
  export { isEqual } from './predicate/isEqual.mjs';
99
- export { isNaN } from './predicate/isNaN.mjs';
100
99
  export { isNil } from './predicate/isNil.mjs';
101
100
  export { isNotNil } from './predicate/isNotNil.mjs';
102
101
  export { isNull } from './predicate/isNull.mjs';
@@ -112,7 +111,6 @@ export { isSymbol } from './predicate/isSymbol.mjs';
112
111
  export { isString } from './predicate/isString.mjs';
113
112
  export { isWeakMap } from './predicate/isWeakMap.mjs';
114
113
  export { isWeakSet } from './predicate/isWeakSet.mjs';
115
- export { isNumber } from './predicate/isNumber.mjs';
116
114
  export { delay } from './promise/delay.mjs';
117
115
  export { withTimeout } from './promise/withTimeout.mjs';
118
116
  export { timeout } from './promise/timeout.mjs';
package/dist/index.d.ts CHANGED
@@ -96,7 +96,6 @@ export { toMerged } from './object/toMerged.js';
96
96
  export { mergeWith } from './object/mergeWith.js';
97
97
  export { isDate } from './predicate/isDate.js';
98
98
  export { isEqual } from './predicate/isEqual.js';
99
- export { isNaN } from './predicate/isNaN.js';
100
99
  export { isNil } from './predicate/isNil.js';
101
100
  export { isNotNil } from './predicate/isNotNil.js';
102
101
  export { isNull } from './predicate/isNull.js';
@@ -112,7 +111,6 @@ export { isSymbol } from './predicate/isSymbol.js';
112
111
  export { isString } from './predicate/isString.js';
113
112
  export { isWeakMap } from './predicate/isWeakMap.js';
114
113
  export { isWeakSet } from './predicate/isWeakSet.js';
115
- export { isNumber } from './predicate/isNumber.js';
116
114
  export { delay } from './promise/delay.js';
117
115
  export { withTimeout } from './promise/withTimeout.js';
118
116
  export { timeout } from './promise/timeout.js';
package/dist/index.js CHANGED
@@ -12,7 +12,7 @@ const randomInt = require('./_chunk/randomInt-CF7bZK.js');
12
12
  const math_index = require('./math/index.js');
13
13
  const object_index = require('./object/index.js');
14
14
  const toMerged = require('./_chunk/toMerged-Bzkqyz.js');
15
- const isNumber = require('./_chunk/isNumber-CM_Bs0.js');
15
+ const isWeakSet = require('./_chunk/isWeakSet-E_VMwB.js');
16
16
  const isPlainObject = require('./_chunk/isPlainObject-BIekvL.js');
17
17
  const predicate_index = require('./predicate/index.js');
18
18
  const string_index = require('./string/index.js');
@@ -118,18 +118,16 @@ exports.merge = toMerged.merge;
118
118
  exports.omitBy = toMerged.omitBy;
119
119
  exports.pickBy = toMerged.pickBy;
120
120
  exports.toMerged = toMerged.toMerged;
121
- exports.isDate = isNumber.isDate;
122
- exports.isEqual = isNumber.isEqual;
123
- exports.isFunction = isNumber.isFunction;
124
- exports.isLength = isNumber.isLength;
125
- exports.isNaN = isNumber.isNaN;
126
- exports.isNil = isNumber.isNil;
127
- exports.isNotNil = isNumber.isNotNil;
128
- exports.isNull = isNumber.isNull;
129
- exports.isNumber = isNumber.isNumber;
130
- exports.isUndefined = isNumber.isUndefined;
131
- exports.isWeakMap = isNumber.isWeakMap;
132
- exports.isWeakSet = isNumber.isWeakSet;
121
+ exports.isDate = isWeakSet.isDate;
122
+ exports.isEqual = isWeakSet.isEqual;
123
+ exports.isFunction = isWeakSet.isFunction;
124
+ exports.isLength = isWeakSet.isLength;
125
+ exports.isNil = isWeakSet.isNil;
126
+ exports.isNotNil = isWeakSet.isNotNil;
127
+ exports.isNull = isWeakSet.isNull;
128
+ exports.isUndefined = isWeakSet.isUndefined;
129
+ exports.isWeakMap = isWeakSet.isWeakMap;
130
+ exports.isWeakSet = isWeakSet.isWeakSet;
133
131
  exports.isPlainObject = isPlainObject.isPlainObject;
134
132
  exports.isPrimitive = isPlainObject.isPrimitive;
135
133
  exports.isTypedArray = isPlainObject.isTypedArray;
package/dist/index.mjs CHANGED
@@ -96,7 +96,6 @@ export { toMerged } from './object/toMerged.mjs';
96
96
  export { mergeWith } from './object/mergeWith.mjs';
97
97
  export { isDate } from './predicate/isDate.mjs';
98
98
  export { isEqual } from './predicate/isEqual.mjs';
99
- export { isNaN } from './predicate/isNaN.mjs';
100
99
  export { isNil } from './predicate/isNil.mjs';
101
100
  export { isNotNil } from './predicate/isNotNil.mjs';
102
101
  export { isNull } from './predicate/isNull.mjs';
@@ -112,7 +111,6 @@ export { isSymbol } from './predicate/isSymbol.mjs';
112
111
  export { isString } from './predicate/isString.mjs';
113
112
  export { isWeakMap } from './predicate/isWeakMap.mjs';
114
113
  export { isWeakSet } from './predicate/isWeakSet.mjs';
115
- export { isNumber } from './predicate/isNumber.mjs';
116
114
  export { delay } from './promise/delay.mjs';
117
115
  export { withTimeout } from './promise/withTimeout.mjs';
118
116
  export { timeout } from './promise/timeout.mjs';
@@ -1,6 +1,5 @@
1
1
  export { isDate } from './isDate.mjs';
2
2
  export { isEqual } from './isEqual.mjs';
3
- export { isNaN } from './isNaN.mjs';
4
3
  export { isNil } from './isNil.mjs';
5
4
  export { isNotNil } from './isNotNil.mjs';
6
5
  export { isNull } from './isNull.mjs';
@@ -16,4 +15,3 @@ export { isSymbol } from './isSymbol.mjs';
16
15
  export { isString } from './isString.mjs';
17
16
  export { isWeakMap } from './isWeakMap.mjs';
18
17
  export { isWeakSet } from './isWeakSet.mjs';
19
- export { isNumber } from './isNumber.mjs';
@@ -1,6 +1,5 @@
1
1
  export { isDate } from './isDate.js';
2
2
  export { isEqual } from './isEqual.js';
3
- export { isNaN } from './isNaN.js';
4
3
  export { isNil } from './isNil.js';
5
4
  export { isNotNil } from './isNotNil.js';
6
5
  export { isNull } from './isNull.js';
@@ -16,4 +15,3 @@ export { isSymbol } from './isSymbol.js';
16
15
  export { isString } from './isString.js';
17
16
  export { isWeakMap } from './isWeakMap.js';
18
17
  export { isWeakSet } from './isWeakSet.js';
19
- export { isNumber } from './isNumber.js';
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
 
5
- const isNumber = require('../_chunk/isNumber-CM_Bs0.js');
5
+ const isWeakSet = require('../_chunk/isWeakSet-E_VMwB.js');
6
6
  const isPlainObject = require('../_chunk/isPlainObject-BIekvL.js');
7
7
 
8
8
  function isRegExp(value) {
@@ -21,18 +21,16 @@ function isString(value) {
21
21
  return typeof value === 'string';
22
22
  }
23
23
 
24
- exports.isDate = isNumber.isDate;
25
- exports.isEqual = isNumber.isEqual;
26
- exports.isFunction = isNumber.isFunction;
27
- exports.isLength = isNumber.isLength;
28
- exports.isNaN = isNumber.isNaN;
29
- exports.isNil = isNumber.isNil;
30
- exports.isNotNil = isNumber.isNotNil;
31
- exports.isNull = isNumber.isNull;
32
- exports.isNumber = isNumber.isNumber;
33
- exports.isUndefined = isNumber.isUndefined;
34
- exports.isWeakMap = isNumber.isWeakMap;
35
- exports.isWeakSet = isNumber.isWeakSet;
24
+ exports.isDate = isWeakSet.isDate;
25
+ exports.isEqual = isWeakSet.isEqual;
26
+ exports.isFunction = isWeakSet.isFunction;
27
+ exports.isLength = isWeakSet.isLength;
28
+ exports.isNil = isWeakSet.isNil;
29
+ exports.isNotNil = isWeakSet.isNotNil;
30
+ exports.isNull = isWeakSet.isNull;
31
+ exports.isUndefined = isWeakSet.isUndefined;
32
+ exports.isWeakMap = isWeakSet.isWeakMap;
33
+ exports.isWeakSet = isWeakSet.isWeakSet;
36
34
  exports.isPlainObject = isPlainObject.isPlainObject;
37
35
  exports.isPrimitive = isPlainObject.isPrimitive;
38
36
  exports.isTypedArray = isPlainObject.isTypedArray;
@@ -1,6 +1,5 @@
1
1
  export { isDate } from './isDate.mjs';
2
2
  export { isEqual } from './isEqual.mjs';
3
- export { isNaN } from './isNaN.mjs';
4
3
  export { isNil } from './isNil.mjs';
5
4
  export { isNotNil } from './isNotNil.mjs';
6
5
  export { isNull } from './isNull.mjs';
@@ -16,4 +15,3 @@ export { isSymbol } from './isSymbol.mjs';
16
15
  export { isString } from './isString.mjs';
17
16
  export { isWeakMap } from './isWeakMap.mjs';
18
17
  export { isWeakSet } from './isWeakSet.mjs';
19
- export { isNumber } from './isNumber.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.19.0-dev.619+3f52c1c2",
4
+ "version": "1.19.0-dev.621+753ccbf9",
5
5
  "homepage": "https://es-toolkit.slash.page",
6
6
  "bugs": "https://github.com/toss/es-toolkit/issues",
7
7
  "repository": {
@@ -1,5 +0,0 @@
1
- function isNumber(value) {
2
- return typeof value === 'number';
3
- }
4
-
5
- export { isNumber };
File without changes
File without changes