UNPKG

363 BJavaScriptView Raw
1export var convert = function (stream) {
2 if (stream instanceof Blob || stream instanceof ReadableStream) {
3 return new Response(stream)
4 .arrayBuffer()
5 .then(function (buffer) { return new Uint8Array(buffer); });
6 }
7 else {
8 throw new Error('Readable is not supported.');
9 }
10};
11//# sourceMappingURL=convert.js.map
\No newline at end of file