Parse shell constant variables into a Javascript object.
Convert the contents of a shell constant variables file to a JavaScript object literal.
.env file
ENV_VAR1=foobar
ENV_VAR2=bazbang
js file
var shellVarParser = require('shellVarParser');
var fileContents = fs.readFileSync(__dirname + '/.env', 'utf8');
var envVars = shellVarParser.parse(fileContents)
// returns {ENV_VAR1: "foobar", ENV_VAR2: "bazbang"}
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
npm install
npm test