Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions doc/api/buffer.md
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,17 @@ added:
Creates and returns a new `Blob` containing a subset of this `Blob` objects
data. The original `Blob` is not altered.

#### `blob.bytes()`
Comment thread
jakecastelli marked this conversation as resolved.
Outdated
Comment thread
daeyeon marked this conversation as resolved.
Outdated

The `blob.bytes()` method returns the byte of the `Blob` object as a `Promise<Uint8Array>`.

Comment thread
jmsb02 marked this conversation as resolved.
Outdated
```js
const blob = new Blob(['hello']);
blob.bytes().then((bytes) => {
console.log(bytes); // Outputs: Uint8Array(5) [ 104, 101, 108, 108, 111 ]
});
```

### `blob.stream()`

<!-- YAML
Expand Down