Skip to main content
Blob.prototype.bytes - node__buffer.d.ts - Node documentation
method Blob.prototype.bytes

Usage in Deno

```typescript import { Blob } from "node:node__buffer.d.ts"; ```
Blob.prototype.bytes(): Promise<Uint8Array>
The `blob.bytes()` method returns the byte of the `Blob` object as a `Promise`. ```js const blob = new Blob(['hello']); blob.bytes().then((bytes) => { console.log(bytes); // Outputs: Uint8Array(5) [ 104, 101, 108, 108, 111 ] }); ```

Return Type

Promise<Uint8Array>