Skip to content

Commit 3ad7408

Browse files
khalsahMylesBorins
authored andcommitted
doc: correct sample output of buf.compare
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]>
1 parent 741373c commit 3ad7408

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/api/buffer.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,7 @@ console.log(buf1.compare(buf1));
757757
console.log(buf1.compare(buf2));
758758
// Prints: -1
759759
console.log(buf1.compare(buf3));
760-
// Prints: 1
760+
// Prints: -1
761761
console.log(buf2.compare(buf1));
762762
// Prints: 1
763763
console.log(buf2.compare(buf3));

0 commit comments

Comments
 (0)