Transform Streams
Modify data as it flows through a pipeline.
What Is a TransformStream?
A TransformStream sits between a readable and a writable side. Chunks written in are transformed and emitted out — a pipe stage that maps, filters, or reshapes data on the fly.
Anatomy
It has two ends: writable (where data goes in) and readable (where transformed data comes out).
const ts = new TransformStream();
console.log(ts.writable, ts.readable);All lessons in this course
- Readable Streams
- Streaming fetch Responses
- Transform Streams
- Backpressure and Piping