beenvo
TypeScript icon, indicating that this package has built-in type declarations

0.5.0 • Public • Published

Beenvo



Build Status Coverage Status NPM version Code Size License


Beenvo let you loads environment variables from files (support many files extensions) for Node.js projects into `process.env` 🐝.

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.
  • 🧼 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

Package Sidebar

Install

npm i beenvo

Weekly Downloads

1

Version

0.5.0

License

MIT

Unpacked Size

11.8 kB

Total Files

5

Last publish

Collaborators

  • 3imed-jaberi