jabr / readable-stream-fanout

A `ReadableStream.tee()` supporting an arbitrary number of branches.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

readable-stream-fanout

A ReadableStream.tee() supporting an arbitrary number of branches.

Example

import ReadableStreamFanout from "./mod.ts"

const fanout = new ReadableStreamFanout(readable)
fanout.start()

fanout.add().pipeTo(writable)

let branch = fanout.add()
for await (const chunk of branch) { /* ... */ }
fanout.close(branch)

References

License

This project is licensed under the terms of the MIT license.

About

A `ReadableStream.tee()` supporting an arbitrary number of branches.

License:MIT License


Languages

Language:TypeScript 100.0%