Noiseless Praying Mantis

envvars

0.1.0 • Public • Published

envvars Build Status js-standard-style

Parse exported environment variables from a string

Install

$ npm install --save envvars

Usage

$ cat .env
export FOO=foo
export FOO_BAR=bar
export BAR_FOO="baz"
var envVars = require('envvars');
 
fs.readFile('.env', 'utf8', function (content) {
  var result = envVars(content)
  // => {foo: 'foo', fooBar: 'bar', barFoo: 'baz'}
})

API

envVars(input)

input

Required
Type: string

The string with the exported variables

License

MIT © Jeduan Cornejo

install

npm i envvars

Downloadsweekly downloads

4

version

0.1.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability