sema-dotenv 0.1.0

API reference · 6 exports

Source declarations and literal docstrings from this release. Package code was not executed.

dotenv/get

(dotenv/get key . default)
Get an environment variable, falling back to default (nil when omitted).

Source: package.sema:104

dotenv/load

(dotenv/load path . opts)
Read a .env file and set its variables in the process environment. Already-set env vars are NOT overridden unless {:override #t} is passed. Returns the full parsed map.

Source: package.sema:85

dotenv/load-if-exists

(dotenv/load-if-exists path . opts)
Like dotenv/load, but returns {} instead of erroring when the file does not exist. Accepts the same {:override #t} option.

Source: package.sema:98

dotenv/parse

(dotenv/parse content)
Parse .env file contents into a {"KEY" "value"} map. Handles comments, export prefixes, quoted values, inline comments, and CRLF line endings; strips a leading UTF-8 BOM; malformed lines are skipped. When a key repeats, the last line wins.

Source: package.sema:75

dotenv/read

(dotenv/read path)
Read and parse a .env file from disk into a map. Errors if the file does not exist.

Source: package.sema:81

dotenv/require

(dotenv/require . required-keys)
Assert that every listed environment variable is set — errors naming the missing ones.

Source: package.sema:111