eu4 / node_modules /axios /lib /helpers /readBlob.js
Neilqwe's picture
Upload 949 files
b061e29 verified
Raw History Blame Contribute Delete
318 Bytes
const {asyncIterator} = Symbol;
const readBlob = async function* (blob) {
if (blob.stream) {
yield* blob.stream()
} else if (blob.arrayBuffer) {
yield await blob.arrayBuffer()
} else if (blob[asyncIterator]) {
yield* blob[asyncIterator]();
} else {
yield blob;
}
}
export default readBlob;