Browse Source

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>
v7.x
Hargobind S. Khalsa 9 years ago
committed by cjihrig
parent
commit
59741a9bee
  1. 2
      doc/api/buffer.md

2
doc/api/buffer.md

@ -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));

Loading…
Cancel
Save