This function filters inline comments after escaped hashtag
(string | array | object)
:
filtered
value
This function filters comments at line start
(array)
array
:
filtered
value
This function filters empty lines
(array)
array
:
filtered
value
This function removes quotation marks
(string)
string
:
filtered
value
This function parse the Global Super process.env The values in process.env will be parsed by parseValue
object
:
env
This function parse the environment file to an Object
(string)
object
:
parsed environment variables
This function parsed
(object | string)
:
value
With processenv2 you have the opportunity to use environment variables directly in your project. You can parse .env files and add them to the global variables process.env. You can also specify default values with processenv2. These values are used if there is no environment variable. This makes it easier to check for errors and use standard configurations.
You also have the option to define nested variables, arrays and objects in the environment file You can use inline comments and masked hashtags (\#)
(string?)
(any?)
(string | object | array | function | undefined)
:
value
This function parsed nested environment key/value pairs
If the nested element (elem) is present in the environment object (env), this will be parsed and returned as value (val). If the key is not present, the element (elem) is returned as a whole.
string
:
(
elem
|
val
)
replaceNestedChars('${HOME}', '${HOME}/log', { HOME: '/var/www' });