Add CI & Deno Supported & Fix a lot of bugs & Webpack for building package

This commit is contained in:
2022-07-02 17:01:00 +00:00
committed by GitHub
parent b3552cb6a2
commit 057c9b9cb5
25 changed files with 2035 additions and 86 deletions

View File

@ -4,17 +4,23 @@ export const platform = (() => {
if (typeof process != "undefined") {
return "Node.js";
}
if (typeof self != "undefined") {
return "Web Worker";
if (typeof Deno != "undefined") {
return "Deno";
}
return "Unknown";
if (typeof self != "undefined") {
return "Service Worker";
}
return undefined;
})();
export const version = (() => {
switch (platform) {
case "Node.js":
return process.version;
case "Deno":
return Deno.version.deno;
case "Service Worker":
return undefined;
default:
return "Unknown";
return undefined;
}
})();