Skip to content

Commit

Permalink
doc: fix wrong function arguments in the buffer.md
Browse files Browse the repository at this point in the history
PR-URL: #9795
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
  • Loading branch information
vsemozhetbyt authored and addaleax committed Dec 8, 2016
1 parent 9e47b94 commit 3b848a2
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 @@ -1264,7 +1264,7 @@ console.log(buf.lastIndexOf('buffer', 4));
const utf16Buffer = Buffer.from('\u039a\u0391\u03a3\u03a3\u0395', 'ucs2');

// Prints: 6
console.log(utf16Buffer.lastIndexOf('\u03a3', null, 'ucs2'));
console.log(utf16Buffer.lastIndexOf('\u03a3', undefined, 'ucs2'));

// Prints: 4
console.log(utf16Buffer.lastIndexOf('\u03a3', -5, 'ucs2'));
Expand Down Expand Up @@ -1446,7 +1446,7 @@ const buf = Buffer.from([0, 5]);
console.log(buf.readInt16BE());

// Prints: 1280
console.log(buf.readInt16LE(1));
console.log(buf.readInt16LE());

// Throws an exception: RangeError: Index out of range
console.log(buf.readInt16LE(1));
Expand Down

0 comments on commit 3b848a2

Please sign in to comment.