import { Env } from "https://deno.land/x/env@v3.0.5/env.js";
A utility for interacting with environment variables
Properties
Lazy-loading property containing a proxy that can be used to automatically throw errors when an undefined environment variable is accessed.
Methods
first(keys, defaultValue)
get(key, defaultValue)
has(key)
Determines if a given environment variable exists.
require(key)
Retrieves an environment variable. If the environment variable does not exist or is an empty string, then it throws an error.
requireFirst(keys)
Retrieves the first environment variable found in a list of environment variable names and throws an error if none of the variables are found.