BubblesB
Denoβ€’4y agoβ€’
19 replies
Bubbles

Sharing streams

So I have a small project where I want to use streams. But now I need two different transform streams on the same input

const file = await Deno.open(path);

const processingStream1 = file.pipeThrough(transform1);
for await (const line of processingStream1) console.log(line);


const processingStream2 = file.pipeThrough(transform2);
for await (const line of processingStream2) console.log(line);
Was this page helpful?