(reader)
| 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; |
no test coverage detected