| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 3f0636d commit ec5c919
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -579,7 +579,7 @@ contained by the `Blob` is copied only when the `arrayBuffer()` or `text()` | |||
| 579 | 579 | methods are called. | |
| 580 | 580 | ||
| 581 | 581 | ```mjs | |
| 582 | - import { Blob, Buffer } from 'node:buffer'; | ||
| 582 | + import { Blob } from 'node:buffer'; | ||
| 583 | 583 | import { setTimeout as delay } from 'node:timers/promises'; | |
| 584 | 584 | ||
| 585 | 585 | const blob = new Blob(['hello there']); | |
@@ -606,7 +606,7 @@ blob.text().then(console.log); | |||
| 606 | 606 | ``` | |
| 607 | 607 | ||
| 608 | 608 | ```cjs | |
| 609 | - const { Blob, Buffer } = require('node:buffer'); | ||
| 609 | + const { Blob } = require('node:buffer'); | ||
| 610 | 610 | const { setTimeout: delay } = require('node:timers/promises'); | |
| 611 | 611 | ||
| 612 | 612 | const blob = new Blob(['hello there']); | |
@@ -1071,7 +1071,7 @@ Copies the underlying memory of `view` into a new `Buffer`. | |||
| 1071 | 1071 | ||
| 1072 | 1072 | ```js | |
| 1073 | 1073 | const u16 = new Uint16Array([0, 0xffff]); | |
| 1074 | - const buf = Buffer.copyBytesFrom(u16, 0, 1); | ||
| 1074 | + const buf = Buffer.copyBytesFrom(u16, 1, 1); | ||
| 1075 | 1075 | u16[1] = 0; | |
| 1076 | 1076 | console.log(buf.length); // 2 | |
| 1077 | 1077 | console.log(buf[0]); // 255 | |
| Back | FazBrowse Home | New Git URL |
0 commit comments