Skip to content
Closed
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: 5 additions & 3 deletions doc/api/buffer.md
Original file line number Diff line number Diff line change
Expand Up @@ -1003,7 +1003,8 @@ changes:
description: Additional parameters for specifying offsets are supported now.
-->

* `target` {Buffer|Uint8Array} A `Buffer` or [`Uint8Array`] to compare to.
* `target` {Buffer|Uint8Array} A `Buffer` or [`Uint8Array`] with which to
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might want to rename target to otherBuffer or rename otherBuffer to target down below. That way it is more consistent.

compare `buf`.
* `targetStart` {integer} The offset within `target` at which to begin
comparison. **Default:** `0`.
* `targetEnd` {integer} The offset with `target` at which to end comparison
Expand Down Expand Up @@ -1148,7 +1149,8 @@ changes:
description: The arguments can now be `Uint8Array`s.
-->

* `otherBuffer` {Buffer} A `Buffer` or [`Uint8Array`] to compare to.
* `otherBuffer` {Buffer} A `Buffer` or [`Uint8Array`] with which to compare
`buf`.
* Returns: {boolean}

Returns `true` if both `buf` and `otherBuffer` have exactly the same bytes,
Expand Down Expand Up @@ -1996,7 +1998,7 @@ console.log(copy);
added: v0.1.90
-->

* `encoding` {string} The character encoding to decode to. **Default:** `'utf8'`.
* `encoding` {string} The character encoding to use. **Default:** `'utf8'`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might only be me, but the former description is somewhat more specific for me and therefore easier to understand.

* `start` {integer} The byte offset to start decoding at. **Default:** `0`.
* `end` {integer} The byte offset to stop decoding at (not inclusive).
**Default:** [`buf.length`].
Expand Down