Map function for transforming stream chunks
The transformation function to apply to each chunk
A TransformStream that applies the transformation
const stream = readable.pipeThrough(map(x => x * 2)); Copy
const stream = readable.pipeThrough(map(x => x * 2));
Map function for transforming stream chunks