mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
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: https://github.com/nodejs/node/pull/16416 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
1 parent
ae5930bbe4
commit
2cbf75da7e
1 file changed
+2
-2
+2
-2
@@ -2408,12 +2408,12 @@ Examples:
|
||||
```js
|
||||
const buf = Buffer.allocUnsafe(6);
|
||||
|
||||
buf.writeUIntBE(0x1234567890ab, 0, 6);
|
||||
buf.writeIntBE(0x1234567890ab, 0, 6);
|
||||
|
||||
// Prints: <Buffer 12 34 56 78 90 ab>
|
||||
console.log(buf);
|
||||
|
||||
buf.writeUIntLE(0x1234567890ab, 0, 6);
|
||||
buf.writeIntLE(0x1234567890ab, 0, 6);
|
||||
|
||||
// Prints: <Buffer ab 90 78 56 34 12>
|
||||
console.log(buf);
|
||||
|
||||
Reference in new issue
Block a user