mirror of
https://github.com/186526/handlers.js
synced 2024-10-13 00:29:43 +00:00
fix types & add bun adapater (WIP)
This commit is contained in:
@ -7,6 +7,9 @@ export const platform = (() => {
|
||||
if (typeof Deno != "undefined") {
|
||||
return "Deno";
|
||||
}
|
||||
if (typeof Bun != "undefined") {
|
||||
return "Bun";
|
||||
}
|
||||
if (typeof tjs != "undefined") {
|
||||
return "txiki.js";
|
||||
}
|
||||
@ -17,7 +20,7 @@ export const platform = (() => {
|
||||
})();
|
||||
export const version = (() => {
|
||||
switch (platform) {
|
||||
case "Node.js":
|
||||
case "Node.js" || "Bun":
|
||||
return process.version;
|
||||
case "Deno":
|
||||
return Deno.version.deno;
|
||||
|
Reference in New Issue
Block a user