Skip to content
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

doc: fixing typos in Buffer doc. #34981

Closed
wants to merge 3 commits into from
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
6 changes: 3 additions & 3 deletions doc/api/buffer.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,14 @@ string into a `Buffer` as decoding.
tabs, and new lines contained within the base64-encoded string are ignored.

* `'hex'`: Encode each byte as two hexadecimal characters. Data truncation
may occur when decoding string that do exclusively contain valid hexadecimal
may occur when decoding strings that do exclusively contain valid hexadecimal
characters. See below for an example.

The following legacy character encodings are also supported:

* `'ascii'`: For 7-bit [ASCII][] data only. When encoding a string into a
`Buffer`, this is equivalent to using `'latin1'`. When decoding a `Buffer`
into a string, using encoding this will additionally unset the highest bit of
into a string, using this encoding will additionally unset the highest bit of
each byte before decoding as `'latin1'`.
Generally, there should be no reason to use this encoding, as `'utf8'`
(or, if the data is known to always be ASCII-only, `'latin1'`) will be a
Expand Down Expand Up @@ -176,7 +176,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
contents, interpreted an array array of integers, and not as a byte sequence
contents, interpreted as an array of integers, and not as a byte sequence
of the target type.

```js
Expand Down