MCPcopy Create free account
hub / github.com/angular/dev-infra / fullyReadBody

Function fullyReadBody

github-actions/saucelabs/set-saucelabs-env.js:4764–4781  ·  view source on GitHub ↗
(body, processBody, processBodyError)

Source from the content-addressed store, hash-verified

4762 return Object.defineProperties(object.prototype, __spreadProps(__spreadValues({}, properties), {
4763 [Symbol.iterator]: {
4764 writable: true,
4765 enumerable: false,
4766 configurable: true,
4767 value: properties.entries.value
4768 }
4769 }));
4770 }
4771 function fullyReadBody(body, processBody, processBodyError) {
4772 return __async(this, null, function* () {
4773 const successSteps = processBody;
4774 const errorSteps = processBodyError;
4775 let reader;
4776 try {
4777 reader = body.stream.getReader();
4778 } catch (e) {
4779 errorSteps(e);
4780 return;
4781 }
4782 try {
4783 successSteps(yield readAllBytes(reader));
4784 } catch (e) {

Callers 2

consumeBodyFunction · 0.70
mainFetchFunction · 0.70

Calls 4

__asyncFunction · 0.70
errorStepsFunction · 0.70
successStepsFunction · 0.70
readAllBytesFunction · 0.70

Tested by

no test coverage detected