Web APIs
Blob.stream()
Create a readable byte stream for the Blob. Chunk boundaries are implementation-dependent; consumers should process the chunks until completion. Example console output: 3.
Formal Syntax & Structure
javascript syntaxjavascript
blob.stream()Return Value
ReadableStream
New stream over the Blob bytes.
Working Example
Example Snippetjavascript
(async () => {const b=new Blob(["abc"]); let total=0; for await(const chunk of b.stream()) total+=chunk.byteLength; console.log(total);})()