We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 90bd8b1 commit 9b858cdCopy full SHA for 9b858cd
package.json
@@ -1,6 +1,6 @@
1
{
2
"name": "reactivexcomponent.js",
3
- "version": "7.0.7",
+ "version": "7.0.8",
4
"description": "Javascript reactive client API for XComponent",
5
"module": "dist/index.js",
6
"main": "dist/index.js",
src/utils/uuid.ts
@@ -1,3 +1,13 @@
+
export function generateUUID(): string {
+ if (typeof crypto !== "undefined" && typeof crypto.randomUUID === "function") {
return crypto.randomUUID();
-}
+ }
7
+ // Fallback (non cryptographique)
8
+ return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
9
+ const r = Math.random() * 16 | 0;
10
+ const v = c === 'x' ? r : (r & 0x3 | 0x8);
11
+ return v.toString(16);
12
+ });
13
+}
0 commit comments