From 9ca7c8603e52644647d1c3f4531caa7a742f8db8 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Thu, 20 Jun 2019 14:08:13 -0600 Subject: [PATCH] doc: remove "note that" from buffer.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Refs: https://github.com/nodejs/remark-preset-lint-node/pull/16 PR-URL: https://github.com/nodejs/node/pull/28329 Reviewed-By: Gus Caplan Reviewed-By: Trivikram Kamat Reviewed-By: Tobias Nießen Reviewed-By: Ruben Bridgewater --- doc/api/buffer.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/doc/api/buffer.md b/doc/api/buffer.md index 00dd366faefc98..9c7c7e58b81882 100644 --- a/doc/api/buffer.md +++ b/doc/api/buffer.md @@ -250,7 +250,7 @@ console.log(buf2); // Prints: ``` -Note that when creating a `Buffer` using a [`TypedArray`][]'s `.buffer`, it is +When creating a `Buffer` using a [`TypedArray`][]'s `.buffer`, it is possible to use only a portion of the underlying [`ArrayBuffer`][] by passing in `byteOffset` and `length` parameters. @@ -597,7 +597,7 @@ console.log(buf); A `TypeError` will be thrown if `size` is not a number. -Note that the `Buffer` module pre-allocates an internal `Buffer` instance of +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 @@ -1501,7 +1501,7 @@ added: v0.1.90 * {integer} -Returns the amount of memory allocated for `buf` in bytes. Note that this +Returns the amount of memory allocated for `buf` in bytes. This does not necessarily reflect the amount of "usable" data within `buf`. ```js @@ -2087,7 +2087,7 @@ buf2.swap64(); // Throws ERR_INVALID_BUFFER_SIZE. ``` -Note that JavaScript cannot encode 64-bit integers. This method is intended +JavaScript cannot encode 64-bit integers. This method is intended for working with 64-bit floats. ### buf.toJSON() @@ -2623,7 +2623,7 @@ Returns the maximum number of bytes that will be returned when `buf.inspect()` is called. This can be overridden by user modules. See [`util.inspect()`][] for more details on `buf.inspect()` behavior. -Note that this is a property on the `buffer` module returned by +This is a property on the `buffer` module returned by `require('buffer')`, not on the `Buffer` global or a `Buffer` instance. ## buffer.kMaxLength @@ -2635,7 +2635,7 @@ added: v3.0.0 An alias for [`buffer.constants.MAX_LENGTH`][]. -Note that this is a property on the `buffer` module returned by +This is a property on the `buffer` module returned by `require('buffer')`, not on the `Buffer` global or a `Buffer` instance. ## buffer.transcode(source, fromEnc, toEnc) @@ -2675,7 +2675,7 @@ console.log(newBuf.toString('ascii')); Because the Euro (`€`) sign is not representable in US-ASCII, it is replaced with `?` in the transcoded `Buffer`. -Note that this is a property on the `buffer` module returned by +This is a property on the `buffer` module returned by `require('buffer')`, not on the `Buffer` global or a `Buffer` instance. ## Class: SlowBuffer @@ -2753,7 +2753,7 @@ console.log(buf); added: v8.2.0 --> -Note that `buffer.constants` is a property on the `buffer` module returned by +`buffer.constants` is a property on the `buffer` module returned by `require('buffer')`, not on the `Buffer` global or a `Buffer` instance. ### buffer.constants.MAX_LENGTH