es-toolkit 1.19.0-dev.620 → 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.
- package/dist/browser.global.js +1 -1
- package/dist/browser.global.js.map +1 -1
- package/dist/compat/index.d.mts +1 -1
- package/dist/compat/index.d.ts +1 -1
- package/dist/compat/index.js +5 -1
- package/dist/compat/index.mjs +1 -1
- package/dist/compat/string/camelCase.d.mts +1 -1
- package/dist/compat/string/camelCase.d.ts +1 -1
- package/dist/compat/string/kebabCase.d.mts +2 -2
- package/dist/compat/string/kebabCase.d.ts +2 -2
- package/dist/compat/string/lowerCase.d.mts +2 -2
- package/dist/compat/string/lowerCase.d.ts +2 -2
- package/dist/compat/string/snakeCase.d.mts +2 -2
- package/dist/compat/string/snakeCase.d.ts +2 -2
- package/dist/compat/string/startCase.d.mts +2 -2
- package/dist/compat/string/startCase.d.ts +2 -2
- package/dist/compat/string/upperCase.d.mts +17 -0
- package/dist/compat/string/upperCase.d.ts +17 -0
- package/dist/compat/string/upperCase.mjs +9 -0
- package/package.json +1 -1
package/dist/compat/index.d.mts
CHANGED
|
@@ -85,7 +85,6 @@ export { isPrimitive } from '../predicate/isPrimitive.mjs';
|
|
|
85
85
|
export { delay } from '../promise/delay.mjs';
|
|
86
86
|
export { withTimeout } from '../promise/withTimeout.mjs';
|
|
87
87
|
export { timeout } from '../promise/timeout.mjs';
|
|
88
|
-
export { upperCase } from '../string/upperCase.mjs';
|
|
89
88
|
export { capitalize } from '../string/capitalize.mjs';
|
|
90
89
|
export { pascalCase } from '../string/pascalCase.mjs';
|
|
91
90
|
export { upperFirst } from '../string/upperFirst.mjs';
|
|
@@ -163,6 +162,7 @@ export { kebabCase } from './string/kebabCase.mjs';
|
|
|
163
162
|
export { snakeCase } from './string/snakeCase.mjs';
|
|
164
163
|
export { startCase } from './string/startCase.mjs';
|
|
165
164
|
export { lowerCase } from './string/lowerCase.mjs';
|
|
165
|
+
export { upperCase } from './string/upperCase.mjs';
|
|
166
166
|
export { startsWith } from './string/startsWith.mjs';
|
|
167
167
|
export { endsWith } from './string/endsWith.mjs';
|
|
168
168
|
export { padStart } from './string/padStart.mjs';
|
package/dist/compat/index.d.ts
CHANGED
|
@@ -85,7 +85,6 @@ export { isPrimitive } from '../predicate/isPrimitive.js';
|
|
|
85
85
|
export { delay } from '../promise/delay.js';
|
|
86
86
|
export { withTimeout } from '../promise/withTimeout.js';
|
|
87
87
|
export { timeout } from '../promise/timeout.js';
|
|
88
|
-
export { upperCase } from '../string/upperCase.js';
|
|
89
88
|
export { capitalize } from '../string/capitalize.js';
|
|
90
89
|
export { pascalCase } from '../string/pascalCase.js';
|
|
91
90
|
export { upperFirst } from '../string/upperFirst.js';
|
|
@@ -163,6 +162,7 @@ export { kebabCase } from './string/kebabCase.js';
|
|
|
163
162
|
export { snakeCase } from './string/snakeCase.js';
|
|
164
163
|
export { startCase } from './string/startCase.js';
|
|
165
164
|
export { lowerCase } from './string/lowerCase.js';
|
|
165
|
+
export { upperCase } from './string/upperCase.js';
|
|
166
166
|
export { startsWith } from './string/startsWith.js';
|
|
167
167
|
export { endsWith } from './string/endsWith.js';
|
|
168
168
|
export { padStart } from './string/padStart.js';
|
package/dist/compat/index.js
CHANGED
|
@@ -1352,6 +1352,10 @@ function lowerCase(str) {
|
|
|
1352
1352
|
return string_index.lowerCase(normalizeForCase(str));
|
|
1353
1353
|
}
|
|
1354
1354
|
|
|
1355
|
+
function upperCase(str) {
|
|
1356
|
+
return string_index.upperCase(normalizeForCase(str));
|
|
1357
|
+
}
|
|
1358
|
+
|
|
1355
1359
|
function startsWith(str, target, position = 0) {
|
|
1356
1360
|
return str.startsWith(target, position);
|
|
1357
1361
|
}
|
|
@@ -1596,7 +1600,6 @@ exports.lowerFirst = string_index.lowerFirst;
|
|
|
1596
1600
|
exports.pad = string_index.pad;
|
|
1597
1601
|
exports.pascalCase = string_index.pascalCase;
|
|
1598
1602
|
exports.unescape = string_index.unescape;
|
|
1599
|
-
exports.upperCase = string_index.upperCase;
|
|
1600
1603
|
exports.upperFirst = string_index.upperFirst;
|
|
1601
1604
|
exports.ary = ary;
|
|
1602
1605
|
exports.attempt = attempt;
|
|
@@ -1680,4 +1683,5 @@ exports.trim = trim;
|
|
|
1680
1683
|
exports.trimEnd = trimEnd;
|
|
1681
1684
|
exports.trimStart = trimStart;
|
|
1682
1685
|
exports.unset = unset;
|
|
1686
|
+
exports.upperCase = upperCase;
|
|
1683
1687
|
exports.zipObjectDeep = zipObjectDeep;
|
package/dist/compat/index.mjs
CHANGED
|
@@ -87,7 +87,6 @@ export { delay } from '../promise/delay.mjs';
|
|
|
87
87
|
export { withTimeout } from '../promise/withTimeout.mjs';
|
|
88
88
|
export { timeout } from '../promise/timeout.mjs';
|
|
89
89
|
export { capitalize } from '../string/capitalize.mjs';
|
|
90
|
-
export { upperCase } from '../string/upperCase.mjs';
|
|
91
90
|
export { pascalCase } from '../string/pascalCase.mjs';
|
|
92
91
|
export { upperFirst } from '../string/upperFirst.mjs';
|
|
93
92
|
export { lowerFirst } from '../string/lowerFirst.mjs';
|
|
@@ -163,6 +162,7 @@ export { kebabCase } from './string/kebabCase.mjs';
|
|
|
163
162
|
export { snakeCase } from './string/snakeCase.mjs';
|
|
164
163
|
export { startCase } from './string/startCase.mjs';
|
|
165
164
|
export { lowerCase } from './string/lowerCase.mjs';
|
|
165
|
+
export { upperCase } from './string/upperCase.mjs';
|
|
166
166
|
export { startsWith } from './string/startsWith.mjs';
|
|
167
167
|
export { endsWith } from './string/endsWith.mjs';
|
|
168
168
|
export { padStart } from './string/padStart.mjs';
|
|
@@ -13,6 +13,6 @@
|
|
|
13
13
|
* const convertedStr3 = camelCase('hyphen-text') // returns 'hyphenText'
|
|
14
14
|
* const convertedStr4 = camelCase('HTTPRequest') // returns 'httpRequest'
|
|
15
15
|
*/
|
|
16
|
-
declare function camelCase(str
|
|
16
|
+
declare function camelCase(str?: string | object): string;
|
|
17
17
|
|
|
18
18
|
export { camelCase };
|
|
@@ -13,6 +13,6 @@
|
|
|
13
13
|
* const convertedStr3 = camelCase('hyphen-text') // returns 'hyphenText'
|
|
14
14
|
* const convertedStr4 = camelCase('HTTPRequest') // returns 'httpRequest'
|
|
15
15
|
*/
|
|
16
|
-
declare function camelCase(str
|
|
16
|
+
declare function camelCase(str?: string | object): string;
|
|
17
17
|
|
|
18
18
|
export { camelCase };
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Kebab case is the naming convention in which each word is written in lowercase and separated by a dash (-) character.
|
|
5
5
|
*
|
|
6
|
-
* @param {string} str - The string that is to be changed to kebab case.
|
|
6
|
+
* @param {string | object} str - The string that is to be changed to kebab case.
|
|
7
7
|
* @returns {string} - The converted string to kebab case.
|
|
8
8
|
*
|
|
9
9
|
* @example
|
|
@@ -12,6 +12,6 @@
|
|
|
12
12
|
* const convertedStr3 = kebabCase('hyphen-text') // returns 'hyphen-text'
|
|
13
13
|
* const convertedStr4 = kebabCase('HTTPRequest') // returns 'http-request'
|
|
14
14
|
*/
|
|
15
|
-
declare function kebabCase(str
|
|
15
|
+
declare function kebabCase(str?: string | object): string;
|
|
16
16
|
|
|
17
17
|
export { kebabCase };
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Kebab case is the naming convention in which each word is written in lowercase and separated by a dash (-) character.
|
|
5
5
|
*
|
|
6
|
-
* @param {string} str - The string that is to be changed to kebab case.
|
|
6
|
+
* @param {string | object} str - The string that is to be changed to kebab case.
|
|
7
7
|
* @returns {string} - The converted string to kebab case.
|
|
8
8
|
*
|
|
9
9
|
* @example
|
|
@@ -12,6 +12,6 @@
|
|
|
12
12
|
* const convertedStr3 = kebabCase('hyphen-text') // returns 'hyphen-text'
|
|
13
13
|
* const convertedStr4 = kebabCase('HTTPRequest') // returns 'http-request'
|
|
14
14
|
*/
|
|
15
|
-
declare function kebabCase(str
|
|
15
|
+
declare function kebabCase(str?: string | object): string;
|
|
16
16
|
|
|
17
17
|
export { kebabCase };
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Lower case is the naming convention in which each word is written in lowercase and separated by an space ( ) character.
|
|
5
5
|
*
|
|
6
|
-
* @param {string} str - The string that is to be changed to lower case.
|
|
6
|
+
* @param {string | object} str - The string that is to be changed to lower case.
|
|
7
7
|
* @returns {string} - The converted string to lower case.
|
|
8
8
|
*
|
|
9
9
|
* @example
|
|
@@ -12,6 +12,6 @@
|
|
|
12
12
|
* const convertedStr3 = lowerCase('hyphen-text') // returns 'hyphen text'
|
|
13
13
|
* const convertedStr4 = lowerCase('HTTPRequest') // returns 'http request'
|
|
14
14
|
*/
|
|
15
|
-
declare function lowerCase(str
|
|
15
|
+
declare function lowerCase(str?: string | object): string;
|
|
16
16
|
|
|
17
17
|
export { lowerCase };
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Lower case is the naming convention in which each word is written in lowercase and separated by an space ( ) character.
|
|
5
5
|
*
|
|
6
|
-
* @param {string} str - The string that is to be changed to lower case.
|
|
6
|
+
* @param {string | object} str - The string that is to be changed to lower case.
|
|
7
7
|
* @returns {string} - The converted string to lower case.
|
|
8
8
|
*
|
|
9
9
|
* @example
|
|
@@ -12,6 +12,6 @@
|
|
|
12
12
|
* const convertedStr3 = lowerCase('hyphen-text') // returns 'hyphen text'
|
|
13
13
|
* const convertedStr4 = lowerCase('HTTPRequest') // returns 'http request'
|
|
14
14
|
*/
|
|
15
|
-
declare function lowerCase(str
|
|
15
|
+
declare function lowerCase(str?: string | object): string;
|
|
16
16
|
|
|
17
17
|
export { lowerCase };
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Snake case is the naming convention in which each word is written in lowercase and separated by an underscore (_) character.
|
|
5
5
|
*
|
|
6
|
-
* @param {string} str - The string that is to be changed to snake case.
|
|
6
|
+
* @param {string | object} str - The string that is to be changed to snake case.
|
|
7
7
|
* @returns {string} - The converted string to snake case.
|
|
8
8
|
*
|
|
9
9
|
* @example
|
|
@@ -12,6 +12,6 @@
|
|
|
12
12
|
* const convertedStr3 = snakeCase('hyphen-text') // returns 'hyphen_text'
|
|
13
13
|
* const convertedStr4 = snakeCase('HTTPRequest') // returns 'http_request'
|
|
14
14
|
*/
|
|
15
|
-
declare function snakeCase(str
|
|
15
|
+
declare function snakeCase(str?: string | object): string;
|
|
16
16
|
|
|
17
17
|
export { snakeCase };
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Snake case is the naming convention in which each word is written in lowercase and separated by an underscore (_) character.
|
|
5
5
|
*
|
|
6
|
-
* @param {string} str - The string that is to be changed to snake case.
|
|
6
|
+
* @param {string | object} str - The string that is to be changed to snake case.
|
|
7
7
|
* @returns {string} - The converted string to snake case.
|
|
8
8
|
*
|
|
9
9
|
* @example
|
|
@@ -12,6 +12,6 @@
|
|
|
12
12
|
* const convertedStr3 = snakeCase('hyphen-text') // returns 'hyphen_text'
|
|
13
13
|
* const convertedStr4 = snakeCase('HTTPRequest') // returns 'http_request'
|
|
14
14
|
*/
|
|
15
|
-
declare function snakeCase(str
|
|
15
|
+
declare function snakeCase(str?: string | object): string;
|
|
16
16
|
|
|
17
17
|
export { snakeCase };
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Converts the first character of each word in a string to uppercase and the remaining characters to lowercase.
|
|
3
3
|
*
|
|
4
4
|
* Start case is the naming convention in which each word is written with an initial capital letter.
|
|
5
|
-
* @param {string} str - The string to convert.
|
|
5
|
+
* @param {string | object} str - The string to convert.
|
|
6
6
|
* @returns {string} The converted string.
|
|
7
7
|
*
|
|
8
8
|
* @example
|
|
@@ -11,6 +11,6 @@
|
|
|
11
11
|
* const result3 = startCase('hello-world'); // result will be 'Hello World'
|
|
12
12
|
* const result4 = startCase('hello_world'); // result will be 'Hello World'
|
|
13
13
|
*/
|
|
14
|
-
declare function startCase(str
|
|
14
|
+
declare function startCase(str?: string | object): string;
|
|
15
15
|
|
|
16
16
|
export { startCase };
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Converts the first character of each word in a string to uppercase and the remaining characters to lowercase.
|
|
3
3
|
*
|
|
4
4
|
* Start case is the naming convention in which each word is written with an initial capital letter.
|
|
5
|
-
* @param {string} str - The string to convert.
|
|
5
|
+
* @param {string | object} str - The string to convert.
|
|
6
6
|
* @returns {string} The converted string.
|
|
7
7
|
*
|
|
8
8
|
* @example
|
|
@@ -11,6 +11,6 @@
|
|
|
11
11
|
* const result3 = startCase('hello-world'); // result will be 'Hello World'
|
|
12
12
|
* const result4 = startCase('hello_world'); // result will be 'Hello World'
|
|
13
13
|
*/
|
|
14
|
-
declare function startCase(str
|
|
14
|
+
declare function startCase(str?: string | object): string;
|
|
15
15
|
|
|
16
16
|
export { startCase };
|
|
@@ -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/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.
|
|
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": {
|