beenvo
v0.5.0
Published
Beenvo let you loads environment variables from files (support many files extensions) for Node.js projects.
Downloads
5
Maintainers
Readme
Features
🦄 Inspired from dotenv.
🚀 Isomorphic to the moon.
🔥 Blaze and lightweight.
🐱🐉 Support many files extensions (not only
.env*
);- ✅ Toml (
*.toml
) support. - ✅ Yaml (
*.yml
and*.yaml
) support. - ✅ Properties (
*.ini
and*.properties
) support. - ✅ Xml (
*.xml
) support. - ✅ Json (
*.json
) support. - ✅ dotEnv (
.env*
) support.
- ✅ Toml (
🧼 Support clean up variables loaded inside
process.env
.📟 Support preload (with cli). [🚧 - welcome to any kind of help 👋🏻]
🐱👤 Strong competitor to the rest dotEnv modules.
🐢 Node.js support.
🦕 Deno support. [🚧 - welcome to any kind of help 👋🏻]
🎉 TypeScript support.
Notes:
Require Node 12+.
Installation
# npm
$ npm install beenvo
# yarn
$ yarn add beenvo
Usage
This is a practical example of how to use.
# create your variables file with name `env.yaml`.
SOME_NUMBER: 1000
SOME_STRING: "don't do that"
// const beenvo = require("beenvo");
import beenvo from "beenvo";
const options = { path: "env.yaml" };
beenvo(options);
// process.env.SOME_NUMBER // 1000
// process.env.SOME_STRING // "don't do that"
if you want more example you can check the test folder or open an issue 😉.
OPTIONS
You can pass options object to beenvo;
options.path
— (String) represent path to the file which contains your variables (default to '.env'
).options.cleanup
— (Boolean) to remove all loaded variables (default to false
).
Support
If you have any problem or suggestion please open an issue.