Skip to content

Commit 514a538

Browse files
robhybridrichardlau
authored andcommitted
doc: fix typos in buffer doc
* pluralize "strings" in hex encoding description. * fix typo in ascii encoding description * remove double "array" PR-URL: #34981 Reviewed-By: Derek Lewis <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
1 parent df76c89 commit 514a538

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

doc/api/buffer.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -107,14 +107,14 @@ string into a `Buffer` as decoding.
107107
tabs, and new lines contained within the base64-encoded string are ignored.
108108

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

113113
The following legacy character encodings are also supported:
114114

115115
* `'ascii'`: For 7-bit [ASCII][] data only. When encoding a string into a
116116
`Buffer`, this is equivalent to using `'latin1'`. When decoding a `Buffer`
117-
into a string, using encoding this will additionally unset the highest bit of
117+
into a string, using this encoding will additionally unset the highest bit of
118118
each byte before decoding as `'latin1'`.
119119
Generally, there should be no reason to use this encoding, as `'utf8'`
120120
(or, if the data is known to always be ASCII-only, `'latin1'`) will be a
@@ -176,7 +176,7 @@ In particular:
176176
There are two ways to create new [`TypedArray`][] instances from a `Buffer`:
177177

178178
* Passing a `Buffer` to a [`TypedArray`][] constructor will copy the `Buffer`s
179-
contents, interpreted an array array of integers, and not as a byte sequence
179+
contents, interpreted as an array of integers, and not as a byte sequence
180180
of the target type.
181181

182182
```js

0 commit comments

Comments
 (0)