# through2

> Tiny helpers for transform streams in Node.js and Web Streams

Source: https://talira.ai/catalog/through2-2xemfwkg
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [libraries / general purpose](https://talira.ai/categories/libraries/general-purpose), [languages / javascript](https://talira.ai/categories/languages/javascript)
- Licence: MIT[^2]
- Pricing: Free and open source[^1]
- Free tier: yes[^1]
- Backed by: [Rod Vagg](https://talira.ai/orgs/rod-vagg.md)

through2 lets you write a transform step for a stream as a plain function instead of subclassing `Transform`. Its `transform`, `objectTransform` and `transformer` helpers take callback-style functions, async functions or async generators and return [Node.js](https://talira.ai/catalog/node-js-6cbqj66f.md) stream instances, and its `through2/web` entry point does the same for the Web Streams API's `TransformStream`. The README has recipes for map, filter, flatMap, batching, tapping and parsing newline-delimited input. Rod Vagg maintains it.

## Links

- GitHub: https://github.com/rvagg/through2

## Problems it solves

- write a Node.js transform stream without subclassing Transform
- map or filter chunks in a stream pipeline
- add a transform step to a Web Streams pipeline

## Features

- transform, objectTransform and transformer helpers for Node.js streams
- accepts callback, async-function and async-generator transforms
- through2/web for Web Streams pipelines
- README recipes for map, filter, flatMap, batch, tap and NDJSON parsing

## Limitations

- Version 5 ships as ESM: CommonJS require() needs Node.js 22.12 or newer, or stay on through2@4.[^1]

## Trust

Overall: 0.48 out of 1.
Signals: maintenance 0.63, adoption 0.66, momentum 0.33, community 0.55, backing 0.30, extensibility 0.00.

- last commit 5 days ago
- 4 commits in the last 90 days
- latest release v5.0.13 5 days ago
- 1.9k GitHub stars
- 23 contributors
- backed by Rod Vagg

## Related

- Works with [Node.js](https://talira.ai/catalog/node-js-6cbqj66f.md)

## Sources

[^1]: https://github.com/rvagg/through2/blob/master/README.md (checked 28 Nov 2026)
[^2]: https://github.com/rvagg/through2/blob/master/LICENSE.md (checked 28 Nov 2026)
