From 3ad74089f538874ca06cf6523c753e8d060ac3c4 Mon Sep 17 00:00:00 2001 From: "Hargobind S. Khalsa" Date: Sun, 17 Jul 2016 16:01:52 -0600 Subject: [PATCH] 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 Reviewed-By: Anna Henningsen --- doc/api/buffer.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/buffer.md b/doc/api/buffer.md index e316f7d9412737..b75d8fae9ef9de 100644 --- a/doc/api/buffer.md +++ b/doc/api/buffer.md @@ -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));