Skip to content

Commit eeee636

Browse files
vsemozhetbytBethGriggs
authored andcommitted
doc: add note about Buffer octets integer coercion
PR-URL: #27030 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Signed-off-by: Beth Griggs <Bethany.Griggs@uk.ibm.com>
1 parent c3d573d commit eeee636

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

doc/api/buffer.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ streams in TCP streams, file system operations, and other contexts.
1212
With [`TypedArray`] now available, the `Buffer` class implements the
1313
[`Uint8Array`] API in a manner that is more optimized and suitable for Node.js.
1414

15-
Instances of the `Buffer` class are similar to arrays of integers but
15+
Instances of the `Buffer` class are similar to arrays of integers from `0` to
16+
`255` (other integers are coerced to this range by `& 255` operation) but
1617
correspond to fixed-sized, raw memory allocations outside the V8 heap.
1718
The size of the `Buffer` is established when it is created and cannot be
1819
changed.

0 commit comments

Comments
 (0)