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

    1

    Version

    0.1.0

    License

    MIT

    Last publish

    Collaborators

    • jeduan