parseEnv
parseEnv(
source,options?):Record<string,string>
Defined in: env/parse-env.ts:112
Parse a whole environment document into its variables, keyed by name.
A later assignment to the same name wins, as it does in a shell. In the
quoted syntaxes a value may span lines, which is how a PEM key or a JSON blob
reaches a .env file.
Parameters
Section titled “Parameters”source
Section titled “source”string
The document to parse.
options?
Section titled “options?”Options for parsing the document.
Returns
Section titled “Returns”Record<string, string>
The parsed variables. Values are always strings; see
parseEnvValueAsNumber and parseEnvValueAsBool to read one as something
else.