envariable

1.0.0 • Public • Published

envariable

npm version Pipeline Badge

envariable is Read .env Into Environment Variables.

yarn add envariable
npm i envariable

Table Of Contents

API

The package is available by importing its default function:

import envariable from 'envariable'

envariable(
  config: !Config,
): void

Read .env Into Environment Variables (in process.env).

  • config* !Config: Options for the program.

Config: Options for the program.

Name Type Description Default
silent boolean Do not print the names of read env variables. false
location string The location where to look up the .env file. ~
name string The name of the .env file. .env

For example, consider the usage for the following .env file:

HELLO=WORLD
import envariable from 'envariable'
 
envariable({
  location: 'example',
})
console.log(process.env.HELLO)
[+] HELLO 
WORLD

Copyright & License

GNU Affero General Public License v3.0

Art Deco © Art Deco™ 2020 AGPL-3.0

Dependents (0)

Package Sidebar

Install

npm i envariable

Weekly Downloads

7

Version

1.0.0

License

AGPL-3.0

Unpacked Size

56.1 kB

Total Files

24

Last publish

Collaborators

  • zvr