Skip to content

Commit 1818d9c

Browse files
strugeetargos
authored andcommitted
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: #29651 Reviewed-By: Anna Henningsen <[email protected]>
1 parent 27f7f89 commit 1818d9c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

doc/api/buffer.md

+3
Original file line numberDiff line numberDiff line change
@@ -1025,6 +1025,9 @@ console.log(buf.toString('ascii'));
10251025
* {ArrayBuffer} The underlying `ArrayBuffer` object based on
10261026
which this `Buffer` object is created.
10271027

1028+
This `ArrayBuffer` is not guaranteed to correspond exactly to the original
1029+
`Buffer`. See the notes on `buf.byteOffset` for details.
1030+
10281031
```js
10291032
const arrayBuffer = new ArrayBuffer(16);
10301033
const buffer = Buffer.from(arrayBuffer);

0 commit comments

Comments
 (0)