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

Function pull1Algorithm

examples/io/streams/modules/streams.js:1253–1267  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1251 ReadableStreamBYOBReaderRead(reader, view, 1, readIntoRequest);
1252 }
1253 function pull1Algorithm() {
1254 if (reading === true) {
1255 readAgainForBranch1 = true;
1256 return Promise.resolve(undefined);
1257 }
1258 reading = true;
1259 const byobRequest = ReadableByteStreamControllerGetBYOBRequest(branch1.controller);
1260 if (byobRequest === null) {
1261 pullWithDefaultReader();
1262 }
1263 else {
1264 pullWithBYOBReader(byobRequest.view, false);
1265 }
1266 return Promise.resolve(undefined);
1267 }
1268 function pull2Algorithm() {
1269 if (reading === true) {
1270 readAgainForBranch2 = true;

Callers 2

pullWithDefaultReaderFunction · 0.85
pullWithBYOBReaderFunction · 0.85

Calls 4

pullWithDefaultReaderFunction · 0.85
pullWithBYOBReaderFunction · 0.85
resolveMethod · 0.45

Tested by

no test coverage detected