Skip to content

Commit 622690f

Browse files
vsemozhetbytaddaleax
authored andcommitted
doc: fix copy-paste artifacts in the buffer.md
PR-URL: #9795 Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: Roman Reiss <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
1 parent 3b848a2 commit 622690f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

doc/api/buffer.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1509,10 +1509,10 @@ Examples:
15091509
```js
15101510
const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]);
15111511

1512-
// Prints: 1234567890ab
1512+
// Prints: -546f87a9cbee
15131513
console.log(buf.readIntLE(0, 6).toString(16));
15141514

1515-
// Prints: -546f87a9cbee
1515+
// Prints: 1234567890ab
15161516
console.log(buf.readIntBE(0, 6).toString(16));
15171517

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

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

17431743
### buf.swap32()

0 commit comments

Comments
 (0)