Skip to content

doc: fix typo in buffer.md #58052

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 29, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions doc/api/buffer.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ the characters.
changes:
- version: v3.0.0
pr-url: https://github.com/nodejs/node/pull/2002
description: The `Buffer`s class now inherits from `Uint8Array`.
description: The `Buffer` class now inherits from `Uint8Array`.
-->

`Buffer` instances are also JavaScript {Uint8Array} and {TypedArray}
Expand All @@ -260,7 +260,7 @@ In particular:

There are two ways to create new {TypedArray} instances from a `Buffer`:

* Passing a `Buffer` to a {TypedArray} constructor will copy the `Buffer`s
* Passing a `Buffer` to a {TypedArray} constructor will copy the `Buffer`'s
contents, interpreted as an array of integers, and not as a byte sequence
of the target type.

Expand All @@ -286,7 +286,7 @@ console.log(uint32array);
// Prints: Uint32Array(4) [ 1, 2, 3, 4 ]
```

* Passing the `Buffer`s underlying {ArrayBuffer} will create a
* Passing the `Buffer`'s underlying {ArrayBuffer} will create a
{TypedArray} that shares its memory with the `Buffer`.

```mjs
Expand Down Expand Up @@ -1585,7 +1585,7 @@ console.log(buffer.buffer === arrayBuffer);

### `buf.byteOffset`

* {integer} The `byteOffset` of the `Buffer`s underlying `ArrayBuffer` object.
* {integer} The `byteOffset` of the `Buffer`'s underlying `ArrayBuffer` object.

When setting `byteOffset` in `Buffer.from(ArrayBuffer, byteOffset, length)`,
or sometimes when allocating a `Buffer` smaller than `Buffer.poolSize`, the
Expand Down
Loading