1.1.0 • Published 5 years ago
process-env-loader v1.1.0
About
Yet another env loader.
Installation
\$ npm i process-env-loader
Usage
import load from "process-env-loader";
load(); // Loads .env from the root of the directory
import load from "process-env-loader";
load("mypath/subfolder/"); // Loads .env from the specified folder
import load from "process-env-loader";
/**
* The key value pairs can be separated by anything,
* as long as you specify the separator when loading the file.
* */
load("mypath/subfolder/", "->"); // Loads .env from the specified folder, using the specified seperator
.env could look like one of these
FOO=BAR
FOO->BAR
FOO,BAR
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.