From 1818d9cbdeb17c92722098cb9c2bd36c8ce71d20 Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Sun, 22 Sep 2019 00:04:36 -0400 Subject: [PATCH] doc: note that buf.buffer's contents might differ This bit me in a personal project since I had no reason to read the `buf.byteOffset` docs, so point readers there explicitly. PR-URL: https://github.com/nodejs/node/pull/29651 Reviewed-By: Anna Henningsen --- doc/api/buffer.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/api/buffer.md b/doc/api/buffer.md index e46e7f0994cff3..a97ab6c2a6314b 100644 --- a/doc/api/buffer.md +++ b/doc/api/buffer.md @@ -1025,6 +1025,9 @@ console.log(buf.toString('ascii')); * {ArrayBuffer} The underlying `ArrayBuffer` object based on which this `Buffer` object is created. +This `ArrayBuffer` is not guaranteed to correspond exactly to the original +`Buffer`. See the notes on `buf.byteOffset` for details. + ```js const arrayBuffer = new ArrayBuffer(16); const buffer = Buffer.from(arrayBuffer);