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: fix a formatting error in buffer.md #8553

Merged
merged 1 commit into from
Sep 17, 2016
Merged
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
12 changes: 6 additions & 6 deletions doc/api/buffer.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,10 +253,10 @@ const buf = Buffer.from(arr.buffer, 0, 16);
console.log(buf.length);
```

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

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

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

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

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