@versini/ui-utilities 1.2.0 → 1.4.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 +19 -14
- 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,22 +1,11 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
@versini/ui-utilities v1.
|
|
2
|
+
@versini/ui-utilities v1.4.0
|
|
3
3
|
© 2025 gizmette.com
|
|
4
4
|
*/
|
|
5
|
-
try {
|
|
6
|
-
if (!window.__VERSINI_UI_UTILITIES__) {
|
|
7
|
-
window.__VERSINI_UI_UTILITIES__ = {
|
|
8
|
-
version: "1.2.0",
|
|
9
|
-
buildTime: "12/19/2025 07:11 PM EST",
|
|
10
|
-
homepage: "https://www.npmjs.com/package/@versini/ui-utilities",
|
|
11
|
-
license: "MIT",
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
} catch (error) {
|
|
15
|
-
// nothing to declare officer
|
|
16
|
-
}
|
|
17
5
|
|
|
18
6
|
|
|
19
7
|
;// CONCATENATED MODULE: ./src/components/index.ts
|
|
8
|
+
// force new release
|
|
20
9
|
/**
|
|
21
10
|
* Creates a debounced function that delays invoking the provided function until
|
|
22
11
|
* after the specified wait time has elapsed since the last time the debounced
|
|
@@ -192,5 +181,21 @@ try {
|
|
|
192
181
|
const latitude = convertDDToDMS(lat, false);
|
|
193
182
|
return `${latitude.deg}° ${latitude.min}' ${latitude.sec}" ${latitude.dir}`;
|
|
194
183
|
};
|
|
184
|
+
/**
|
|
185
|
+
* Converts camelCase or PascalCase strings into human-readable, title-cased text
|
|
186
|
+
* by inserting spaces before uppercase characters and normalizing whitespace.
|
|
187
|
+
*
|
|
188
|
+
* @param input - The identifier-like string to humanize.
|
|
189
|
+
* @returns A title-cased, space-separated representation of the input.
|
|
190
|
+
*/ const convertStringToHumanReadable = (input)=>{
|
|
191
|
+
if (!input) {
|
|
192
|
+
return "";
|
|
193
|
+
}
|
|
194
|
+
const normalized = input.replace(/([A-Z])/g, " $1").replace(/\s+/g, " ").trim();
|
|
195
|
+
if (!normalized) {
|
|
196
|
+
return "";
|
|
197
|
+
}
|
|
198
|
+
return normalized.charAt(0).toUpperCase() + normalized.slice(1);
|
|
199
|
+
};
|
|
195
200
|
|
|
196
|
-
export { convertDDToDMS, convertLatitudeToDMS, debounce, isPWAMode, isProbablyMobile, isProbablyTablet, isProbablyiPad, isProbablyiPhone, numberFormatter, obfuscate, pluralize, unObfuscate };
|
|
201
|
+
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.4.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": "b2ee2e328ecadfbedcb26d14afa896a30f0ab54b"
|
|
43
43
|
}
|