split2 is a Node.js stream utility that breaks an incoming stream into line-based chunks (by default splitting on newlines) and emits each line as a separate `data` chunk. It can be configured with a string or regular expression matcher, supports options like `maxLength` and `skipOverflow`, and can also transform each line into other values (for example, parsing newline-delimited JSON with a mapper like `JSON.parse`).
Project status
- Maintenance status: The repo shows at least some activity (last upstream push noted on 2024-06-10), but the most recent published updates in the provided history are v4.2.0 from 2023-03-26, suggesting slow, maintenance-oriented development rather than frequent iteration.
- Update cadence: Updates appear infrequent, with a large gap from v4.2.0 (2023-03-26) back to v4.1.0 (2021-10-24), and another substantial jump to v4.0.0 (2021-10-14).
AI summary generated Today
Recent updates
v4.2.0
3/26/2023v4.2.0 adds support for implementing Symbol.split on the matcher argument, with a corresponding new unit test. The release also bumps the code style linter (standard) to v17 and includes a small README example fix.
Featuresv4.1.0
10/24/2021v4.1.0 updates the project to support Node 10 in CI and declares a Node engine requirement in package.json. The release notes mention adding the engines field and adding Node 10.x to the CI matrix, and the code diff matches those changes.
Breakingv4.0.0
10/14/2021This release (v4.0.0) updates the project to target newer Node.js versions and modernizes the toolchain (notably StandardJS). However, the code changes go beyond the release notes, including a switch away from readable-stream to Node's built-in stream implementation and changes to stream lifecycle behavior.
v3.2.2
8/22/2020Release v3.2.2 is described in the release notes only as “Fixes #40”. The actual diff between v3.2.0 and v3.2.2 shows no source code changes, only a version bump in package.json.
v3.2.0
8/17/2020v3.2.0 focuses on improving test and CI setup, and adding handling for exceptions thrown by the mapper function. The code change adds try/catch around mapper invocation so thrown errors are forwarded to the stream error path instead of surfacing as a raw exception.
Breakingv3.1.1
3/16/2019Release v3.1.1 is a small maintenance update to split2. The documented changes focus on adding tests and ensuring the provided options object is not modified by the split implementation.
v3.1.0
12/14/2018v3.1.0 introduces a new option, skipOverflow, intended to change how the stream behaves when the internal buffer exceeds maxLength. The implementation adds internal overflow state handling to either throw an error or skip past offending lines, and it also changes how maxLength is enforced relative to chunk splitting.
BreakingFeaturesv3.0.0
8/12/2018v3.0.0 updates split2 to use readable-stream v3 and refactors the stream implementation accordingly. The release notes only mention the dependency update, but the diff shows additional behavioral-adjacent changes to stream construction and project/tooling compatibility.
Featuresv2.2.0
9/25/2017Release v2.2.0 primarily fixes the default readableState highWaterMark for the readable side of the split2 stream in objectMode. It also updates README typos and adjusts the project tooling and tests to modernize Buffer usage and add coverage for the highWaterMark behavior.
Breakingv2.1.1
1/2/2017Release v2.1.1 contains primarily documentation updates to the copyright year. The actual code changes also include a package.json update that bumps the module version and refreshes dependency version ranges.