0.5.0 โข Published 2 years ago
beenvo v0.5.0
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.
License
MIT ยฉ Imed Jaberi