DenoDDeno
Powered by
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);
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);
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,934Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

Rewind streams
BubblesBBubbles / help
4y ago
Deno.serve() + sharp + streams
functiondjFfunctiondj / help
2y ago
`multipart` file upload streams
karimfromjordanKkarimfromjordan / help
4y ago
Writing and sharing libraries locally
uc.manuel_38211Uuc.manuel_38211 / help
15mo ago