Skip to content

Commit

Permalink
doc: correct sample output of buf.compare
Browse files Browse the repository at this point in the history
Comparing the buffers `ABC` and `ABCD` returns `-1` not `1`.

PR-URL: #7777
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
  • Loading branch information
khalsah authored and evanlucas committed Jul 20, 2016
1 parent f97aa4b commit 4b320ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doc/api/buffer.md
Original file line number Diff line number Diff line change
Expand Up @@ -806,7 +806,7 @@ console.log(buf1.compare(buf1));
console.log(buf1.compare(buf2));
// Prints: -1
console.log(buf1.compare(buf3));
// Prints: 1
// Prints: -1
console.log(buf2.compare(buf1));
// Prints: 1
console.log(buf2.compare(buf3));
Expand Down

0 comments on commit 4b320ad

Please sign in to comment.