es-toolkit 1.16.0-dev.469 → 1.16.0-dev.471
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 -0
- package/dist/compat/index.d.ts +1 -0
- package/dist/compat/index.js +1 -0
- package/dist/compat/index.mjs +1 -0
- package/dist/compat/predicate/isRegExp.d.mts +1 -1
- package/dist/compat/predicate/isRegExp.d.ts +1 -1
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.mjs +1 -0
- package/dist/string/index.d.mts +1 -0
- package/dist/string/index.d.ts +1 -0
- package/dist/string/index.js +5 -0
- package/dist/string/index.mjs +1 -0
- package/dist/string/lowerFirst.d.mts +14 -0
- package/dist/string/lowerFirst.d.ts +14 -0
- package/dist/string/lowerFirst.mjs +5 -0
- package/package.json +1 -1
package/dist/compat/index.d.mts
CHANGED
|
@@ -94,6 +94,7 @@ export { lowerCase } from '../string/lowerCase.mjs';
|
|
|
94
94
|
export { startCase } from '../string/startCase.mjs';
|
|
95
95
|
export { capitalize } from '../string/capitalize.mjs';
|
|
96
96
|
export { pascalCase } from '../string/pascalCase.mjs';
|
|
97
|
+
export { lowerFirst } from '../string/lowerFirst.mjs';
|
|
97
98
|
export { chunk } from './array/chunk.mjs';
|
|
98
99
|
export { concat } from './array/concat.mjs';
|
|
99
100
|
export { difference } from './array/difference.mjs';
|
package/dist/compat/index.d.ts
CHANGED
|
@@ -94,6 +94,7 @@ export { lowerCase } from '../string/lowerCase.js';
|
|
|
94
94
|
export { startCase } from '../string/startCase.js';
|
|
95
95
|
export { capitalize } from '../string/capitalize.js';
|
|
96
96
|
export { pascalCase } from '../string/pascalCase.js';
|
|
97
|
+
export { lowerFirst } from '../string/lowerFirst.js';
|
|
97
98
|
export { chunk } from './array/chunk.js';
|
|
98
99
|
export { concat } from './array/concat.js';
|
|
99
100
|
export { difference } from './array/difference.js';
|
package/dist/compat/index.js
CHANGED
|
@@ -915,6 +915,7 @@ exports.camelCase = string_index.camelCase;
|
|
|
915
915
|
exports.capitalize = string_index.capitalize;
|
|
916
916
|
exports.kebabCase = string_index.kebabCase;
|
|
917
917
|
exports.lowerCase = string_index.lowerCase;
|
|
918
|
+
exports.lowerFirst = string_index.lowerFirst;
|
|
918
919
|
exports.pascalCase = string_index.pascalCase;
|
|
919
920
|
exports.snakeCase = string_index.snakeCase;
|
|
920
921
|
exports.startCase = string_index.startCase;
|
package/dist/compat/index.mjs
CHANGED
|
@@ -95,6 +95,7 @@ export { lowerCase } from '../string/lowerCase.mjs';
|
|
|
95
95
|
export { startCase } from '../string/startCase.mjs';
|
|
96
96
|
export { capitalize } from '../string/capitalize.mjs';
|
|
97
97
|
export { pascalCase } from '../string/pascalCase.mjs';
|
|
98
|
+
export { lowerFirst } from '../string/lowerFirst.mjs';
|
|
98
99
|
export { chunk } from './array/chunk.mjs';
|
|
99
100
|
export { concat } from './array/concat.mjs';
|
|
100
101
|
export { difference } from './array/difference.mjs';
|
|
@@ -4,6 +4,6 @@
|
|
|
4
4
|
* @param {unknown} value The value to check.
|
|
5
5
|
* @returns {boolean} Returns `true` if `value` is a RegExp, `false` otherwise.
|
|
6
6
|
*/
|
|
7
|
-
declare function isRegExp(value
|
|
7
|
+
declare function isRegExp(value?: unknown): value is RegExp;
|
|
8
8
|
|
|
9
9
|
export { isRegExp };
|
|
@@ -4,6 +4,6 @@
|
|
|
4
4
|
* @param {unknown} value The value to check.
|
|
5
5
|
* @returns {boolean} Returns `true` if `value` is a RegExp, `false` otherwise.
|
|
6
6
|
*/
|
|
7
|
-
declare function isRegExp(value
|
|
7
|
+
declare function isRegExp(value?: unknown): value is RegExp;
|
|
8
8
|
|
|
9
9
|
export { isRegExp };
|
package/dist/index.d.mts
CHANGED
|
@@ -112,3 +112,4 @@ export { lowerCase } from './string/lowerCase.mjs';
|
|
|
112
112
|
export { startCase } from './string/startCase.mjs';
|
|
113
113
|
export { capitalize } from './string/capitalize.mjs';
|
|
114
114
|
export { pascalCase } from './string/pascalCase.mjs';
|
|
115
|
+
export { lowerFirst } from './string/lowerFirst.mjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -112,3 +112,4 @@ export { lowerCase } from './string/lowerCase.js';
|
|
|
112
112
|
export { startCase } from './string/startCase.js';
|
|
113
113
|
export { capitalize } from './string/capitalize.js';
|
|
114
114
|
export { pascalCase } from './string/pascalCase.js';
|
|
115
|
+
export { lowerFirst } from './string/lowerFirst.js';
|
package/dist/index.js
CHANGED
|
@@ -128,6 +128,7 @@ exports.camelCase = string_index.camelCase;
|
|
|
128
128
|
exports.capitalize = string_index.capitalize;
|
|
129
129
|
exports.kebabCase = string_index.kebabCase;
|
|
130
130
|
exports.lowerCase = string_index.lowerCase;
|
|
131
|
+
exports.lowerFirst = string_index.lowerFirst;
|
|
131
132
|
exports.pascalCase = string_index.pascalCase;
|
|
132
133
|
exports.snakeCase = string_index.snakeCase;
|
|
133
134
|
exports.startCase = string_index.startCase;
|
package/dist/index.mjs
CHANGED
|
@@ -112,3 +112,4 @@ export { lowerCase } from './string/lowerCase.mjs';
|
|
|
112
112
|
export { startCase } from './string/startCase.mjs';
|
|
113
113
|
export { capitalize } from './string/capitalize.mjs';
|
|
114
114
|
export { pascalCase } from './string/pascalCase.mjs';
|
|
115
|
+
export { lowerFirst } from './string/lowerFirst.mjs';
|
package/dist/string/index.d.mts
CHANGED
package/dist/string/index.d.ts
CHANGED
package/dist/string/index.js
CHANGED
|
@@ -57,10 +57,15 @@ const pascalCase = (str) => {
|
|
|
57
57
|
return words.map(word => capitalize(word)).join('');
|
|
58
58
|
};
|
|
59
59
|
|
|
60
|
+
const lowerFirst = (str) => {
|
|
61
|
+
return str.substring(0, 1).toLowerCase() + str.substring(1);
|
|
62
|
+
};
|
|
63
|
+
|
|
60
64
|
exports.camelCase = camelCase;
|
|
61
65
|
exports.capitalize = capitalize;
|
|
62
66
|
exports.kebabCase = kebabCase;
|
|
63
67
|
exports.lowerCase = lowerCase;
|
|
68
|
+
exports.lowerFirst = lowerFirst;
|
|
64
69
|
exports.pascalCase = pascalCase;
|
|
65
70
|
exports.snakeCase = snakeCase;
|
|
66
71
|
exports.startCase = startCase;
|
package/dist/string/index.mjs
CHANGED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Converts the first character of string to lower case.
|
|
3
|
+
*
|
|
4
|
+
* @param {string} str - The string that is to be changed
|
|
5
|
+
* @returns {string} - The converted string.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* const convertedStr1 = lowerCase('fred') // returns 'fred'
|
|
9
|
+
* const convertedStr2 = lowerCase('Fred') // returns 'Fred'
|
|
10
|
+
* const convertedStr3 = lowerCase('FRED') // returns 'FRED'
|
|
11
|
+
*/
|
|
12
|
+
declare const lowerFirst: (str: string) => string;
|
|
13
|
+
|
|
14
|
+
export { lowerFirst };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Converts the first character of string to lower case.
|
|
3
|
+
*
|
|
4
|
+
* @param {string} str - The string that is to be changed
|
|
5
|
+
* @returns {string} - The converted string.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* const convertedStr1 = lowerCase('fred') // returns 'fred'
|
|
9
|
+
* const convertedStr2 = lowerCase('Fred') // returns 'Fred'
|
|
10
|
+
* const convertedStr3 = lowerCase('FRED') // returns 'FRED'
|
|
11
|
+
*/
|
|
12
|
+
declare const lowerFirst: (str: string) => string;
|
|
13
|
+
|
|
14
|
+
export { lowerFirst };
|
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.16.0-dev.
|
|
4
|
+
"version": "1.16.0-dev.471+02643bcb",
|
|
5
5
|
"homepage": "https://es-toolkit.slash.page",
|
|
6
6
|
"bugs": "https://github.com/toss/es-toolkit/issues",
|
|
7
7
|
"repository": {
|