Skip to content

Commit 2cbf75d

Browse files
damiancMylesBorins
authored andcommitted
doc: replace methods used in the example code
Methods `buf.writeUIntLE()` and `buf.writeUIntBE()` were used in the example code for the section of the methods `writeIntLE()` and `writeIntBE()` instead of the latter. PR-URL: #16416 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
1 parent ae5930b commit 2cbf75d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/api/buffer.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2408,12 +2408,12 @@ Examples:
24082408
```js
24092409
const buf = Buffer.allocUnsafe(6);
24102410

2411-
buf.writeUIntBE(0x1234567890ab, 0, 6);
2411+
buf.writeIntBE(0x1234567890ab, 0, 6);
24122412

24132413
// Prints: <Buffer 12 34 56 78 90 ab>
24142414
console.log(buf);
24152415

2416-
buf.writeUIntLE(0x1234567890ab, 0, 6);
2416+
buf.writeIntLE(0x1234567890ab, 0, 6);
24172417

24182418
// Prints: <Buffer ab 90 78 56 34 12>
24192419
console.log(buf);

0 commit comments

Comments
 (0)