diff options
author | AJ Jordan <alex@strugee.net> | 2019-09-22 00:04:36 -0400 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2019-11-30 18:25:54 +0100 |
commit | 5833cfd6d82baf77c6f570ef7e165479ab524dc6 (patch) | |
tree | 9b8e436ab466996e09fcc6e1777a4ef56cb33303 | |
parent | 62c61b754d7ade2d806fe9017818eb252c54353c (diff) | |
download | android-node-v8-5833cfd6d82baf77c6f570ef7e165479ab524dc6.tar.gz android-node-v8-5833cfd6d82baf77c6f570ef7e165479ab524dc6.tar.bz2 android-node-v8-5833cfd6d82baf77c6f570ef7e165479ab524dc6.zip |
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 <anna@addaleax.net>
-rw-r--r-- | doc/api/buffer.md | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/doc/api/buffer.md b/doc/api/buffer.md index e46e7f0994..a97ab6c2a6 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); |