Skip to content

Commit 8af811f

Browse files
vsemozhetbytMylesBorins
authored andcommitted
doc: fix copy-paste artifacts in the buffer.md
PR-URL: #9795 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Anna Henningsen <anna@addaleax.net>
1 parent a2b40ad commit 8af811f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

doc/api/buffer.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1511,10 +1511,10 @@ Examples:
15111511
```js
15121512
const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]);
15131513

1514-
// Prints: 1234567890ab
1514+
// Prints: -546f87a9cbee
15151515
console.log(buf.readIntLE(0, 6).toString(16));
15161516

1517-
// Prints: -546f87a9cbee
1517+
// Prints: 1234567890ab
15181518
console.log(buf.readIntBE(0, 6).toString(16));
15191519

15201520
// Throws an exception: RangeError: Index out of range
@@ -1739,7 +1739,7 @@ console.log(buf1);
17391739
const buf2 = Buffer.from([0x1, 0x2, 0x3]);
17401740

17411741
// Throws an exception: RangeError: Buffer size must be a multiple of 16-bits
1742-
buf2.swap32();
1742+
buf2.swap16();
17431743
```
17441744

17451745
### buf.swap32()

0 commit comments

Comments
 (0)