Skip to content

Commit

Permalink
Add documentation for blob.bytes() method
Browse files Browse the repository at this point in the history
  • Loading branch information
jmsb02 committed Jul 30, 2024
1 parent 3a5b542 commit 1cecc42
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions doc/api/buffer.md
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,15 @@ added:
Creates and returns a new `Blob` containing a subset of this `Blob` objects
data. The original `Blob` is not altered.

#### `blob.bytes()`

The `blob.bytes()` method returns the byte of the `Blob` object as a `Buffer`.

```js
const blob = new Blob(['hello']);
console.log(blob.bytes()); // Outputs: <Buffer 68 65 6c 6c 6f>


### `blob.stream()`

<!-- YAML
Expand Down

0 comments on commit 1cecc42

Please sign in to comment.