Skip to main content
Module

x/enzastdlib/vendor/@deno-std-dotenv.ts>LoadOptions

enzastdlib is a set of TypeScript modules that follow a common design API philosophy aiming at sane defaults and ease-of-use targeting the Deno TypeScript runtime.
Latest
interface LoadOptions
import { type LoadOptions } from "https://deno.land/x/enzastdlib@v0.0.4/vendor/@deno-std-dotenv.ts";

Properties

optional
envPath: string | null = "./.env"

Optional path to .env file. To prevent the default value from being used, set to null.

optional
export: boolean = false

Set to true to export all .env variables to the current processes environment. Variables are then accessable via Deno.env.get(<key>).

optional
examplePath: string | null = "./.env.example"

Optional path to .env.example file which is used for validation. To prevent the default value from being used, set to null.

optional
allowEmptyValues: boolean = false

Set to true to allow required env variables to be empty. Otherwise, it will throw an error if any variable is empty.

optional
defaultsPath: string | null = "./.env.defaults"

Optional path to .env.defaults file which is used to define default (fallback) values. To prevent the default value from being used, set to null.

# .env.defaults
# Will not be set if GREETING is set in base .env file
GREETING="a secret to everybody"
optional
restrictEnvAccessTo: StringList

List of Env variables to read from process. By default, the complete Env is looked up. This allows to permit access to only specific Env variables with --allow-env=ENV_VAR_NAME.