grimen/node-env-file — pull request #3 by alxndr (2014-01-30 08:08:34+00:00)
Title: parse out more shell comments

node-env-file assigns variables that have been commented out like `BAZ` is here:

FOO=1
#BAR=2
BAZ=3

When poking around I found there were some other ways I sometimes add comments to env files which would be parsed oddly. I've added those as new examples to the test suite.

(This parsing is nowhere near comprehensive; the mixture of quoting and commenting is beyond regular expressions AFAIK. But I believe this works for common cases with double-quotes.)

Spaces in a quoted value would make it hiccup as well, fixed and tested here.