probot
Version:
A framework for building GitHub Apps to automate and improve your workflow
17 lines (16 loc) • 440 B
JavaScript
import { detectRuntime } from "./detect-runtime.js";
export function getRuntimeName(globalThis) {
const runtime = detectRuntime(globalThis);
switch (runtime) {
case "node":
return "Node.js";
case "deno":
return "Deno";
case "bun":
return "Bun";
case "browser":
return "Browser";
default:
throw new Error("Unknown runtime");
}
}