channel-rpc
Advanced tools
Comparing version 0.2.2 to 0.2.3
@@ -21,2 +21,6 @@ const MessageTypes = { | ||
function generateUUID() { | ||
if (typeof crypto !== "undefined" && | ||
typeof crypto?.randomUUID === "function") { | ||
return crypto.randomUUID(); | ||
} | ||
return new Array(4) | ||
@@ -23,0 +27,0 @@ .fill(0) |
{ | ||
"name": "channel-rpc", | ||
"version": "0.2.2", | ||
"version": "0.2.3", | ||
"description": "JSON-RPC over postMessage", | ||
@@ -5,0 +5,0 @@ "author": "kouhin", |
@@ -62,2 +62,8 @@ interface JsonRpcRequest { | ||
function generateUUID(): string { | ||
if ( | ||
typeof crypto !== "undefined" && | ||
typeof crypto?.randomUUID === "function" | ||
) { | ||
return crypto.randomUUID(); | ||
} | ||
return new Array(4) | ||
@@ -64,0 +70,0 @@ .fill(0) |
26866
688