import { Either, type IEither } from "@emprespresso/utils"; export const getRequiredEnv = (name: string): IEither => Either.fromFailable(() => { const value = Deno.env.get(name); // could throw when no permission. if (!value) { throw new Error(`environment variable "${name}" is required D:`); } return value; });