(body, processBody, processBodyError)
| 4762 | })); |
| 4763 | } |
| 4764 | function fullyReadBody(body, processBody, processBodyError) { |
| 4765 | return __async(this, null, function* () { |
| 4766 | const successSteps = processBody; |
| 4767 | const errorSteps = processBodyError; |
| 4768 | let reader; |
| 4769 | try { |
| 4770 | reader = body.stream.getReader(); |
| 4771 | } catch (e) { |
| 4772 | errorSteps(e); |
| 4773 | return; |
| 4774 | } |
| 4775 | try { |
| 4776 | successSteps(yield readAllBytes(reader)); |
| 4777 | } catch (e) { |
| 4778 | errorSteps(e); |
| 4779 | } |
| 4780 | }); |
| 4781 | } |
| 4782 | function isReadableStreamLike(stream) { |
| 4783 | return stream instanceof ReadableStream || stream[Symbol.toStringTag] === "ReadableStream" && typeof stream.tee === "function"; |
| 4784 | } |
no test coverage detected