@arsedizioni/ars-utils 21.2.294 → 21.2.296
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/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs +6 -8
- package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-core.mjs +11 -0
- package/fesm2022/arsedizioni-ars-utils-core.mjs.map +1 -1
- package/package.json +1 -1
- package/types/arsedizioni-ars-utils-clipper.ui.d.ts +1 -1
- package/types/arsedizioni-ars-utils-core.d.ts +6 -0
- package/types/arsedizioni-ars-utils-ui.application.d.ts +1 -1
- package/types/arsedizioni-ars-utils-ui.d.ts +1 -1
|
@@ -650,6 +650,17 @@ class SystemUtils {
|
|
|
650
650
|
return v.toString(16);
|
|
651
651
|
});
|
|
652
652
|
}
|
|
653
|
+
/**
|
|
654
|
+
* Reconstruct a standard UUID (with dashes) from a 32-char hex string without dashes.
|
|
655
|
+
* @param value : 32-character hex string
|
|
656
|
+
* @returns : the formatted UUID or the original string if it doesn't match the expected format
|
|
657
|
+
*/
|
|
658
|
+
static inflateUUID(value) {
|
|
659
|
+
const s = value.trim();
|
|
660
|
+
if (s.length !== 32 || this.parseUUID(s))
|
|
661
|
+
return s;
|
|
662
|
+
return `${s.slice(0, 8)}-${s.slice(8, 12)}-${s.slice(12, 16)}-${s.slice(16, 20)}-${s.slice(20)}`;
|
|
663
|
+
}
|
|
653
664
|
/**
|
|
654
665
|
* Parse a text and return true if is a valid email or null
|
|
655
666
|
* @param value : email
|