env-parser (digitalsadhu/env-parser) is a streaming transform module designed to parse individual `key=value` pairs from a stream and emit JavaScript objects. It processes data by splitting on the first equals sign (`=`) and automatically removes quotation marks from values if present. As of version 1.0.1, last published in June 2015, this package appears to be unmaintained. Its primary use case is for integrating into Node.js stream pipelines where environment variable-like strings are being processed sequentially, rather than for parsing complete `.env` files. There are no indications of active development or a release cadence, and newer, more comprehensive environment variable parsing libraries are widely available.
npm install env-parserVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to use `env-parser` as a Node.js Transform stream, feeding it simulated environment variable strings and listening for the parsed objects.
Use CommonJS `require()` syntax: `const envParser = require('env-parser');`Consider migrating to actively maintained alternatives like `dotenv` for `.env` file parsing or a more robust streaming parser if your use case specifically requires line-by-line stream processing.
Ensure input data is formatted as single `KEY=VALUE` lines. For more complex `.env` parsing, use a dedicated library like `dotenv` or `envfile`. If comments are desired, they must be stripped from the input stream *before* passing to `env-parser`.
Always invoke the required module as a function: `const parser = require('env-parser')();`Call the required module to get a stream instance: `const parser = require('env-parser')();`Use CommonJS `require()` syntax: `const envParser = require('env-parser');`. If you must use ESM, consider a CommonJS wrapper or a different, actively maintained package with ESM support.No dependency data recorded yet.