Creates a new EnvParser instance
Raw environment file contents
Application root directory URL
Optionaloptions: { ignoreProcessEnv: boolean }Parser options
StaticidentifierDefine an identifier for any environment value. The callback is invoked when the value match the identifier to modify its interpolation.
The identifier name
Callback function to process the identifier value
StaticdefineDefine an identifier for any environment value. The callback is invoked when the value match the identifier to modify its interpolation.
The identifier name
Callback function to process the identifier value
StaticdefineDefine an identifier for any environment value, if it's not already defined. The callback is invoked when the value match the identifier to modify its interpolation.
The identifier name
Callback function to process the identifier value
StaticremoveRemove an identifier
The identifier name to remove
Parse the env string to an object of environment variables.
Promise resolving to parsed environment variables
Env parser parses the environment variables from a string formatted as a key-value pair seperated using an
=. For example:The variables can reference other environment variables as well using
$. For example:The variables using characters other than letters can wrap variable named inside a curly brace.
You can escape the
$sign with a backtick.Usage