diff --git a/doc/api/buffer.md b/doc/api/buffer.md index c02cfa69c24d2f..a80ec9d316414a 100644 --- a/doc/api/buffer.md +++ b/doc/api/buffer.md @@ -179,9 +179,9 @@ In particular: * While [`TypedArray.prototype.slice()`][] creates a copy of part of the `TypedArray`, [`Buffer.prototype.slice()`][`buf.slice()`] creates a view over the existing `Buffer` without copying. This behavior can be surprising, and only exists for legacy - compatibility. [`TypedArray.prototype.subarray()`][] can be used to achieve the behavior - of [`Buffer.prototype.slice()`][`buf.slice()`] on both `Buffer`s and other - `TypedArray`s. + compatibility. [`TypedArray.prototype.subarray()`][] can be used to achieve + the behavior of [`Buffer.prototype.slice()`][`buf.slice()`] on both `Buffer`s + and other `TypedArray`s. * [`buf.toString()`][] is incompatible with its `TypedArray` equivalent. * A number of methods, e.g. [`buf.indexOf()`][], support additional arguments. @@ -1086,9 +1086,9 @@ added: v0.1.90 Copies data from a region of `buf` to a region in `target`, even if the `target` memory region overlaps with `buf`. -[`TypedArray.prototype.set()`][] performs the same operation, and is available for all -TypedArrays, including Node.js `Buffer`s, although it takes different -function arguments. +[`TypedArray.prototype.set()`][] performs the same operation, and is available +for all TypedArrays, including Node.js `Buffer`s, although it takes +different function arguments. ```js // Create two `Buffer` instances. @@ -2136,7 +2136,7 @@ offset and cropped by the `start` and `end` indices. Specifying `end` greater than [`buf.length`][] will return the same result as that of `end` equal to [`buf.length`][]. -This method is inherited from [`TypedArray.subarray()`][]. +This method is inherited from [`TypedArray.prototype.subarray()`][]. Modifying the new `Buffer` slice will modify the memory in the original `Buffer` because the allocated memory of the two objects overlap.