Download node_modules/axios/lib/helpers/readBlob.js from Neilqwe/eu4: direct link, hf CLI and curl.
- Browser
- Download file 318 Bytes
-
https://huggingface.co/spaces/Neilqwe/eu4/resolve/main/node_modules/axios/lib/helpers/readBlob.js
- Command line
-
hf download hf://spaces/Neilqwe/eu4/node_modules/axios/lib/helpers/readBlob.js
-
curl -L -o readBlob.js https://huggingface.co/spaces/Neilqwe/eu4/resolve/main/node_modules/axios/lib/helpers/readBlob.js
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; | |