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

Function pull2Algorithm

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

Source from the content-addressed store, hash-verified

1266 return Promise.resolve(undefined);
1267 }
1268 function pull2Algorithm() {
1269 if (reading === true) {
1270 readAgainForBranch2 = true;
1271 return Promise.resolve(undefined);
1272 }
1273 reading = true;
1274 const byobRequest = ReadableByteStreamControllerGetBYOBRequest(branch2.controller);
1275 if (byobRequest === null) {
1276 pullWithDefaultReader();
1277 }
1278 else {
1279 pullWithBYOBReader(byobRequest.view, true);
1280 }
1281 return Promise.resolve(undefined);
1282 }
1283 function cancel1Algorithm(reason) {
1284 canceled1 = true;
1285 reason1 = reason;

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