/readable-stream-fanout

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

Primary LanguageTypeScriptMIT LicenseMIT

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.