Loading devShakib…
Convert dotenv files to a JSON object and back, handling comments and quoted values.
The dotenv format looks trivial and is not quite. Values may be quoted or bare, quoting changes whether a `#` starts a comment or is part of the value, and multi-line values only survive if they are quoted. Converting to JSON forces every one of those ambiguities to be resolved, which is why a round trip often reveals a line that was not saying what its author thought.
The direction people need more often is the way back — turning a JSON block of config into a `.env` a container or CI runner can read. Worth remembering that everything in these files is a string; there are no numbers or booleans in an environment, only text that your code decides to interpret.