diff options
author | Vse Mozhet Byt <vsemozhetbyt@gmail.com> | 2018-04-02 08:38:48 +0300 |
---|---|---|
committer | Vse Mozhet Byt <vsemozhetbyt@gmail.com> | 2018-04-04 13:45:39 +0300 |
commit | de0053cc3280bdf72c9010f383290f79120a1e98 (patch) | |
tree | 493fc9bd84c3d8e97342202d0a840b4fe29bdd6e /doc/api/buffer.md | |
parent | 237cbe10fb82ba6ec69b14193a4a970e184306e7 (diff) | |
download | android-node-v8-de0053cc3280bdf72c9010f383290f79120a1e98.tar.gz android-node-v8-de0053cc3280bdf72c9010f383290f79120a1e98.tar.bz2 android-node-v8-de0053cc3280bdf72c9010f383290f79120a1e98.zip |
doc: fix various nits
* Replace 2 hyphens (--) by spaced m-dashes (—) as per STYLE_GUIDE.md.
* Space infix operators.
* Unify quotes in inline code spans (use only single quotes).
* Unify `* Returns:` (eliminate deviations).
* Dedupe spaces.
PR-URL: https://github.com/nodejs/node/pull/19743
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Diffstat (limited to 'doc/api/buffer.md')
-rw-r--r-- | doc/api/buffer.md | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/doc/api/buffer.md b/doc/api/buffer.md index f3514f20b7..eb3b93e0f0 100644 --- a/doc/api/buffer.md +++ b/doc/api/buffer.md @@ -59,7 +59,7 @@ differently based on what arguments are provided: entire `Buffer`. While this behavior is *intentional* to improve performance, development experience has demonstrated that a more explicit distinction is required between creating a fast-but-uninitialized `Buffer` versus creating a - slower-but-safer `Buffer`. Starting in Node.js 8.0.0, `Buffer(num)` and + slower-but-safer `Buffer`. Starting in Node.js 8.0.0, `Buffer(num)` and `new Buffer(num)` will return a `Buffer` with initialized memory. * Passing a string, array, or `Buffer` as the first argument copies the passed object's data into the `Buffer`. @@ -426,7 +426,7 @@ changes: * `size` {integer} The desired length of the new `Buffer`. -Allocates a new `Buffer` of `size` bytes. If the `size` is larger than +Allocates a new `Buffer` of `size` bytes. If the `size` is larger than [`buffer.constants.MAX_LENGTH`] or smaller than 0, a [`RangeError`] will be thrown. A zero-length `Buffer` will be created if `size` is 0. @@ -510,7 +510,7 @@ console.log(buf); // Prints: <Buffer 00 00 00 00 00> ``` -Allocates a new `Buffer` of `size` bytes. If the `size` is larger than +Allocates a new `Buffer` of `size` bytes. If the `size` is larger than [`buffer.constants.MAX_LENGTH`] or smaller than 0, a [`RangeError`] will be thrown. A zero-length `Buffer` will be created if `size` is 0. @@ -551,7 +551,7 @@ changes: * `size` {integer} The desired length of the new `Buffer`. -Allocates a new `Buffer` of `size` bytes. If the `size` is larger than +Allocates a new `Buffer` of `size` bytes. If the `size` is larger than [`buffer.constants.MAX_LENGTH`] or smaller than 0, a [`RangeError`] will be thrown. A zero-length `Buffer` will be created if `size` is 0. @@ -595,7 +595,7 @@ added: v5.12.0 * `size` {integer} The desired length of the new `Buffer`. -Allocates a new `Buffer` of `size` bytes. If the `size` is larger than +Allocates a new `Buffer` of `size` bytes. If the `size` is larger than [`buffer.constants.MAX_LENGTH`] or smaller than 0, a [`RangeError`] will be thrown. A zero-length `Buffer` will be created if `size` is 0. @@ -2498,7 +2498,7 @@ deprecated: v6.0.0 * `size` {integer} The desired length of the new `SlowBuffer`. -Allocates a new `Buffer` of `size` bytes. If the `size` is larger than +Allocates a new `Buffer` of `size` bytes. If the `size` is larger than [`buffer.constants.MAX_LENGTH`] or smaller than 0, a [`RangeError`] will be thrown. A zero-length `Buffer` will be created if `size` is 0. |