File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -581,7 +581,7 @@ contained by the `Blob` is copied only when the `arrayBuffer()` or `text()`
581
581
methods are called.
582
582
583
583
``` mjs
584
- import { Blob , Buffer } from ' node:buffer' ;
584
+ import { Blob } from ' node:buffer' ;
585
585
import { setTimeout as delay } from ' node:timers/promises' ;
586
586
587
587
const blob = new Blob ([' hello there' ]);
@@ -608,7 +608,7 @@ blob.text().then(console.log);
608
608
```
609
609
610
610
``` cjs
611
- const { Blob , Buffer } = require (' node:buffer' );
611
+ const { Blob } = require (' node:buffer' );
612
612
const { setTimeout: delay } = require (' node:timers/promises' );
613
613
614
614
const blob = new Blob ([' hello there' ]);
@@ -1078,8 +1078,8 @@ const u16 = new Uint16Array([0, 0xffff]);
1078
1078
const buf = Buffer .copyBytesFrom (u16, 0 , 1 );
1079
1079
u16[1 ] = 0 ;
1080
1080
console .log (buf .length ); // 2
1081
- console .log (buf[0 ]); // 255
1082
- console .log (buf[1 ]); // 255
1081
+ console .log (buf[0 ]); // 0
1082
+ console .log (buf[1 ]); // 0
1083
1083
```
1084
1084
1085
1085
### Static method: ` Buffer.from(array) `
You can’t perform that action at this time.
0 commit comments