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

Function readAllBytes

github-actions/browserstack/set-browserstack-env.js:4801–4817  ·  view source on GitHub ↗
(reader)

Source from the content-addressed store, hash-verified

4799 return input;
4800 }
4801 function readAllBytes(reader) {
4802 return __async(this, null, function* () {
4803 const bytes = [];
4804 let byteLength = 0;
4805 while (true) {
4806 const { done, value: chunk } = yield reader.read();
4807 if (done) {
4808 return Buffer.concat(bytes, byteLength);
4809 }
4810 if (!isUint8Array(chunk)) {
4811 throw new TypeError("Received non-Uint8Array chunk");
4812 }
4813 bytes.push(chunk);
4814 byteLength += chunk.length;
4815 }
4816 });
4817 }
4818 function urlIsLocal(url) {
4819 assert("protocol" in url);
4820 const protocol = url.protocol;

Callers 2

fullyReadBodyFunction · 0.70
putMethod · 0.70

Calls 2

__asyncFunction · 0.70
pushMethod · 0.45

Tested by

no test coverage detected