Skip to content

stream: expose ReadableStreamTee#64195

Open
mcollina wants to merge 1 commit into
nodejs:mainfrom
mcollina:expose-readable-stream-tee
Open

stream: expose ReadableStreamTee#64195
mcollina wants to merge 1 commit into
nodejs:mainfrom
mcollina:expose-readable-stream-tee

Conversation

@mcollina

Copy link
Copy Markdown
Member

Refs: nodejs/undici#5358

Expose ReadableStreamTee() so Fetch body clone can use cloneForBranch2.

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/streams

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. stream Issues and PRs related to the stream subsystem. labels Jun 29, 2026
@mcollina mcollina requested a review from KhafraDev June 29, 2026 10:47
@MattiasBuelens

Copy link
Copy Markdown
Contributor

I don't know if we should be exposing this as a top-level function. At the very least, we should mark ReadableStreamTee() as experimental and guide users towards readableStream.tee() for "common" use cases.

Ideally, we land on a solution in the Streams standard itself. The current proposal is to add an options bag to tee(), so you could write readableStream.tee({ clone: true }). Tracking issue: whatwg/streams#1156.

Signed-off-by: Matteo Collina <hello@matteocollina.com>
@mcollina mcollina force-pushed the expose-readable-stream-tee branch from 4430357 to fb6e605 Compare June 29, 2026 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ci PRs that need a full CI run. stream Issues and PRs related to the stream subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants