Quantumbraid's picture
download
raw
323 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;

Xet Storage Details

Size:
323 Bytes
·
Xet hash:
c9baca3ade55a29f1b73dff6f404920f8d68fcb4fe5ff6ebe7948c5e7160709e

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.