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.
@@ -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';
@@ -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';
@@ -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;
@@ -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: unknown): value is RegExp;
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: unknown): value is RegExp;
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';
@@ -5,3 +5,4 @@ export { lowerCase } from './lowerCase.mjs';
5
5
  export { startCase } from './startCase.mjs';
6
6
  export { capitalize } from './capitalize.mjs';
7
7
  export { pascalCase } from './pascalCase.mjs';
8
+ export { lowerFirst } from './lowerFirst.mjs';
@@ -5,3 +5,4 @@ export { lowerCase } from './lowerCase.js';
5
5
  export { startCase } from './startCase.js';
6
6
  export { capitalize } from './capitalize.js';
7
7
  export { pascalCase } from './pascalCase.js';
8
+ export { lowerFirst } from './lowerFirst.js';
@@ -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;
@@ -5,3 +5,4 @@ export { lowerCase } from './lowerCase.mjs';
5
5
  export { startCase } from './startCase.mjs';
6
6
  export { capitalize } from './capitalize.mjs';
7
7
  export { pascalCase } from './pascalCase.mjs';
8
+ export { lowerFirst } from './lowerFirst.mjs';
@@ -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 };
@@ -0,0 +1,5 @@
1
+ const lowerFirst = (str) => {
2
+ return str.substring(0, 1).toLowerCase() + str.substring(1);
3
+ };
4
+
5
+ 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.469+e4361253",
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": {