Function
| Static Public Summary | ||
| public |
If only the |
|
Static Public
public env(name: string, value: *): * source
import env from '@becquerel/framework/lib/env.js'If only the name parameter is provided this function acts as a getter for
process.env. However if name and value are provide it acts as a setter
for process.env. When acting as a getter the function will try to call
JSON.parse() on the value cast to lowercase (to convert 'true' to true,
'TRUE' to true, '1' to 1, etc.) and if that fails it will return the
value verbatim.
Params:
| Name | Type | Attribute | Description |
| name | string | The envvar name to interact with. |
|
| value | * |
|
If provided sets the value of the |
Return:
| * | The parsed envvar value, regardless of if called as a getter or setter. |