Skip to content

Commit 1cecc42

Browse files
committed
Add documentation for blob.bytes() method
1 parent 3a5b542 commit 1cecc42

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

doc/api/buffer.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -538,6 +538,15 @@ added:
538538
Creates and returns a new `Blob` containing a subset of this `Blob` objects
539539
data. The original `Blob` is not altered.
540540

541+
#### `blob.bytes()`
542+
543+
The `blob.bytes()` method returns the byte of the `Blob` object as a `Buffer`.
544+
545+
```js
546+
const blob = new Blob(['hello']);
547+
console.log(blob.bytes()); // Outputs: <Buffer 68 65 6c 6c 6f>
548+
549+
541550
### `blob.stream()`
542551

543552
<!-- YAML

0 commit comments

Comments
 (0)