@react-hive/honey-utils 3.15.0 → 3.17.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.
- package/README.md +3 -0
- package/dist/README.md +3 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.dev.cjs +138 -1
- package/dist/index.dev.cjs.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/string/find-char-indices.d.ts +15 -0
- package/dist/string/for-each-char.d.ts +43 -0
- package/dist/string/get-words-initials.d.ts +12 -0
- package/dist/string/index.d.ts +3 -0
- package/package.json +1 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns the uppercase initials of the words in a string.
|
|
3
|
+
*
|
|
4
|
+
* The first character of each word is extracted, concatenated, and uppercased.
|
|
5
|
+
*
|
|
6
|
+
* @param input - The input string.
|
|
7
|
+
* @param maxWords - Maximum number of words to include when generating initials.
|
|
8
|
+
* Defaults to `Infinity`.
|
|
9
|
+
*
|
|
10
|
+
* @returns A string containing the uppercase initials of the selected words.
|
|
11
|
+
*/
|
|
12
|
+
export declare const getWordsInitials: (input: string, maxWords?: number) => string;
|
package/dist/string/index.d.ts
CHANGED
|
@@ -5,3 +5,6 @@ export * from './camel-to-words';
|
|
|
5
5
|
export * from './split-string-into-words';
|
|
6
6
|
export * from './is-nil-or-empty-string';
|
|
7
7
|
export * from './parse-file-name';
|
|
8
|
+
export * from './find-char-indices';
|
|
9
|
+
export * from './for-each-char';
|
|
10
|
+
export * from './get-words-initials';
|
package/package.json
CHANGED