0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00

doc: correct sample output of buf.compare

Comparing the buffers `ABC` and `ABCD` returns `-1` not `1`.

PR-URL: https://github.com/nodejs/node/pull/7777
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
This commit is contained in:
Hargobind S. Khalsa 2016-07-17 16:01:52 -06:00 committed by cjihrig
parent 5cdbbdf94d
commit 59741a9bee

View File

@ -815,7 +815,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));