@unifyme/config

0.1.0 • Public • Published

Build Status Coverage Status

config

Unify config from package.json, .env file, environment variables and argv

Install

npm install config

Usage

config()

Automatically it'll pick your config from the config hash on your package.json file, your project .env file, your environment variables and your CLI arguments. Your config will be available at process.env as string environment variables, if you want them parsed instead you can get the returned value of the config() call:

const args = config()

APi

config([argv], [options])

  • argv: array where to fetch the CLI arguments. If not defined, it will fetch them from process.argv.slice(2)
  • options: options passed to dotenv

Package Sidebar

Install

npm i @unifyme/config

Weekly Downloads

3

Version

0.1.0

License

BSD-3-Clause

Unpacked Size

5.81 kB

Total Files

7

Last publish

Collaborators

  • piranna