GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — doc: add documentation for blob.bytes() method · nodejs/node@11fdaa6

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • doc/api
    • buffer.md
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎doc/api/buffer.md‎

Copy file name to clipboardExpand all lines: doc/api/buffer.md
+17Lines changed: 17 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -513,6 +513,23 @@ added:
513513
Returns a promise that fulfills with an {ArrayBuffer} containing a copy of
514514
the `Blob` data.
515515

516+
#### `blob.bytes()`
517+
518+
<!-- YAML
519+
added:
520+
- v22.3.0
521+
- v20.16.0
522+
-->
523+
524+
The `blob.bytes()` method returns the byte of the `Blob` object as a `Promise<Uint8Array>`.
525+
526+
```js
527+
const blob = new Blob(['hello']);
528+
blob.bytes().then((bytes) => {
529+
console.log(bytes); // Outputs: Uint8Array(5) [ 104, 101, 108, 108, 111 ]
530+
});
531+
```
532+
516533
### `blob.size`
517534

518535
<!-- YAML

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.