Skip to content

Commit 2d23227

Browse files
ChALkeRFishrock123
authored andcommitted
doc: fix a formatting error in buffer.md
It was treated as a link to "e.g. `Uint8Array.from()`". PR-URL: #8553 Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Bryan English <bryan@bryanenglish.com> Reviewed-By: Trevor Norris <trev.norris@gmail.com>
1 parent ee319b7 commit 2d23227

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

doc/api/buffer.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -253,10 +253,10 @@ const buf = Buffer.from(arr.buffer, 0, 16);
253253
console.log(buf.length);
254254
```
255255

256-
The `Buffer.from()` and [`TypedArray.from()`] (e.g. `Uint8Array.from()`) have
257-
different signatures and implementations. Specifically, the [`TypedArray`] variants
258-
accept a second argument that is a mapping function that is invoked on every
259-
element of the typed array:
256+
The `Buffer.from()` and [`TypedArray.from()`] have different signatures and
257+
implementations. Specifically, the [`TypedArray`] variants accept a second
258+
argument that is a mapping function that is invoked on every element of the
259+
typed array:
260260

261261
* `TypedArray.from(source[, mapFn[, thisArg]])`
262262

@@ -538,8 +538,8 @@ A `TypeError` will be thrown if `size` is not a number.
538538

539539
Note that the `Buffer` module pre-allocates an internal `Buffer` instance of
540540
size [`Buffer.poolSize`] that is used as a pool for the fast allocation of new
541-
`Buffer` instances created using [`Buffer.allocUnsafe()`] (and the deprecated
542-
`new Buffer(size)` constructor) only when `size` is less than or equal to
541+
`Buffer` instances created using [`Buffer.allocUnsafe()`] and the deprecated
542+
`new Buffer(size)` constructor only when `size` is less than or equal to
543543
`Buffer.poolSize >> 1` (floor of [`Buffer.poolSize`] divided by two).
544544

545545
Use of this pre-allocated internal memory pool is a key difference between

0 commit comments

Comments
 (0)