Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b575e63

Browse filesBrowse files
robhybridaddaleax
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 <DerekNonGeneric@inf.is> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
1 parent 9bb6814 commit b575e63
Copy full SHA for b575e63

File tree

Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed
Open diff view settings
Collapse file

‎doc/api/buffer.md‎

Copy file name to clipboardExpand all lines: doc/api/buffer.md
+3-3Lines changed: 3 additions & 3 deletions
  • Display the source diff
  • Display the rich diff
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.