@versini/ui-utilities 1.2.0 → 1.3.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/dist/index.d.ts +9 -0
- package/dist/index.js +20 -4
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -29,6 +29,15 @@ export declare const convertDDToDMS: (dd: number, lng: boolean) => {
|
|
|
29
29
|
*/
|
|
30
30
|
export declare const convertLatitudeToDMS: (lat?: number) => string;
|
|
31
31
|
|
|
32
|
+
/**
|
|
33
|
+
* Converts camelCase or PascalCase strings into human-readable, title-cased text
|
|
34
|
+
* by inserting spaces before uppercase characters and normalizing whitespace.
|
|
35
|
+
*
|
|
36
|
+
* @param input - The identifier-like string to humanize.
|
|
37
|
+
* @returns A title-cased, space-separated representation of the input.
|
|
38
|
+
*/
|
|
39
|
+
export declare const convertStringToHumanReadable: (input: string) => string;
|
|
40
|
+
|
|
32
41
|
/**
|
|
33
42
|
* Creates a debounced function that delays invoking the provided function until
|
|
34
43
|
* after the specified wait time has elapsed since the last time the debounced
|
package/dist/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
@versini/ui-utilities v1.
|
|
2
|
+
@versini/ui-utilities v1.3.0
|
|
3
3
|
© 2025 gizmette.com
|
|
4
4
|
*/
|
|
5
5
|
try {
|
|
6
6
|
if (!window.__VERSINI_UI_UTILITIES__) {
|
|
7
7
|
window.__VERSINI_UI_UTILITIES__ = {
|
|
8
|
-
version: "1.
|
|
9
|
-
buildTime: "12/19/2025
|
|
8
|
+
version: "1.3.0",
|
|
9
|
+
buildTime: "12/19/2025 08:08 PM EST",
|
|
10
10
|
homepage: "https://www.npmjs.com/package/@versini/ui-utilities",
|
|
11
11
|
license: "MIT",
|
|
12
12
|
};
|
|
@@ -192,5 +192,21 @@ try {
|
|
|
192
192
|
const latitude = convertDDToDMS(lat, false);
|
|
193
193
|
return `${latitude.deg}° ${latitude.min}' ${latitude.sec}" ${latitude.dir}`;
|
|
194
194
|
};
|
|
195
|
+
/**
|
|
196
|
+
* Converts camelCase or PascalCase strings into human-readable, title-cased text
|
|
197
|
+
* by inserting spaces before uppercase characters and normalizing whitespace.
|
|
198
|
+
*
|
|
199
|
+
* @param input - The identifier-like string to humanize.
|
|
200
|
+
* @returns A title-cased, space-separated representation of the input.
|
|
201
|
+
*/ const convertStringToHumanReadable = (input)=>{
|
|
202
|
+
if (!input) {
|
|
203
|
+
return "";
|
|
204
|
+
}
|
|
205
|
+
const normalized = input.replace(/([A-Z])/g, " $1").replace(/\s+/g, " ").trim();
|
|
206
|
+
if (!normalized) {
|
|
207
|
+
return "";
|
|
208
|
+
}
|
|
209
|
+
return normalized.charAt(0).toUpperCase() + normalized.slice(1);
|
|
210
|
+
};
|
|
195
211
|
|
|
196
|
-
export { convertDDToDMS, convertLatitudeToDMS, debounce, isPWAMode, isProbablyMobile, isProbablyTablet, isProbablyiPad, isProbablyiPhone, numberFormatter, obfuscate, pluralize, unObfuscate };
|
|
212
|
+
export { convertDDToDMS, convertLatitudeToDMS, convertStringToHumanReadable, debounce, isPWAMode, isProbablyMobile, isProbablyTablet, isProbablyiPad, isProbablyiPhone, numberFormatter, obfuscate, pluralize, unObfuscate };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@versini/ui-utilities",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Arno Versini",
|
|
6
6
|
"publishConfig": {
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"sideEffects": [
|
|
40
40
|
"**/*.css"
|
|
41
41
|
],
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "3cd6b66a229c88f97e68f9de9cea8d4fabbb55ae"
|
|
43
43
|
}
|