Skip to content
This repository has been archived by the owner on Aug 31, 2018. It is now read-only.

Commit

Permalink
doc: replace methods used in the example code
Browse files Browse the repository at this point in the history
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: nodejs/node#16416
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
  • Loading branch information
damianc authored and addaleax committed Oct 26, 2017
1 parent 22e645a commit 5d2504e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/api/buffer.md
Original file line number Diff line number Diff line change
Expand Up @@ -2383,12 +2383,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);
Expand Down

0 comments on commit 5d2504e

Please sign in to comment.