Skip to content

Add documentation for ReadableStream.tee() #9285

Description

@eminence

Which Cloudflare product does this pertain to?

Workers

Existing documentation URL(s)

https://developers.cloudflare.com/workers/runtime-apis/streams/readablestream/

Section that requires update

The "Methods" section

What needs to change?

A new section for the tee() method.

How should it change?

The ReadableStream type has a tee() method (which is well-documented in other places, like the MDN docs).

The MDN docs highlight potential for unbounded memory usage, in case one consumer is much slower than the other consumer.

However, Cloudflare's implementation of ReadableStream has special support for this case, as documented in this README. This README is unfortunately hard to discover (thanks to @KianNH who pointed it out to me).

It would be nice if the methods section of the docs included this important info about the specific Cloudflare implementation of tee()

Additional information

No response

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions