MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / ReadableStreamTee

Function ReadableStreamTee

examples/io/streams/modules/streams.js:980–987  ·  view source on GitHub ↗
(stream, cloneForBranch2)

Source from the content-addressed store, hash-verified

978 });
979}
980function ReadableStreamTee(stream, cloneForBranch2) {
981 assert(ReadableStreamBrand.has(stream.self));
982 assert(typeof(cloneForBranch2) == "boolean");
983 const controller = stream.controller;
984 if (ReadableByteStreamControllerBrand.has(controller.self))
985 return ReadableByteStreamTee(stream);
986 return ReadableStreamDefaultTee(stream, cloneForBranch2);
987}
988function ReadableStreamDefaultTee(stream) {
989 assert(ReadableStreamBrand.has(stream.self));
990 const reader = AcquireReadableStreamDefaultReader(stream);

Callers 1

teeMethod · 0.85

Calls 4

ReadableByteStreamTeeFunction · 0.85
ReadableStreamDefaultTeeFunction · 0.85
assertFunction · 0.70
hasMethod · 0.45

Tested by

no test coverage detected