This commit is contained in:
Mrhongxing committed 2026-11-12 02:48:46 +08:00
1 parent d1ee8edbbd
commit 7733a44362
429 files changed
+75840 -94

No files matched your search

+15
View File
@@ -0,0 +1,15 @@
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;