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 <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
  • Loading branch information
khalsah authored and rvagg committed Oct 18, 2016
1 parent cc05991 commit 6802a91
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 @@ -757,7 +757,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 6802a91

Please sign in to comment.