const _hasEnv = !Deno.permissions.querySync({ name: "env" }); const _env: "development" | "production" = _hasEnv && (Deno.env.get("ENVIRONMENT") ?? "").toLowerCase().includes("prod") ? "production" : "development"; export const isProd = () => _env === "production"; const _debug = !isProd() || (_hasEnv && ["y", "t"].some((Deno.env.get("DEBUG") ?? "").toLowerCase().startsWith)); export const isDebug = () => _debug;