-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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: Buffer() text copyediting #19567
Conversation
doc/api/buffer.md
Outdated
appropriately initialize newly allocated `Buffer` content, can inadvertently | ||
introduce security and reliability issues into their code. | ||
Because the behavior of `new Buffer()` is different depending on the type of the | ||
first argument, security and reliability issues can be inadvertantly introduced |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
inadvertantly -> inadvertently?
doc/api/buffer.md
Outdated
* [`Buffer.from(buffer)`] returns a new `Buffer` containing a *copy* of the | ||
* [`Buffer.from(array)`] returns a new `Buffer` that *contains a copy* of the | ||
provided octets. | ||
* [`Buffer.from(arrayBuffer[, byteOffset [, length]])`] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line break makes the link not to be rendered properly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doc/api/buffer.md
Outdated
* [`Buffer.allocUnsafe(size)`][`Buffer.allocUnsafe()`] and | ||
[`Buffer.allocUnsafeSlow(size)`][`Buffer.allocUnsafeSlow()`] each return a | ||
new `Buffer` of the specified `size` whose content *must* be initialized | ||
using either [`buf.fill(0)`][`buf.fill()`] or written to completely. | ||
new unintialized `Buffer` of the specified `size`. Because the `Buffer` is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unintialized -> uninitialized?
doc/api/buffer.md
Outdated
new `Buffer` of the specified `size` whose content *must* be initialized | ||
using either [`buf.fill(0)`][`buf.fill()`] or written to completely. | ||
new unintialized `Buffer` of the specified `size`. Because the `Buffer` is | ||
uninitalized, it may contain potentially-sensitive data. Do not use this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uninitalized -> uninitialized?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With nits)
Guess I forgot to run the spell-check this time..... |
97692c8
to
0c8b45c
Compare
doc/api/buffer.md
Outdated
* [`Buffer.alloc(size[, fill[, encoding]])`][`Buffer.alloc()`] returns a new | ||
initialized `Buffer` of the specified size. This method is slower than | ||
[`Buffer.allocUnsafe(size)`][`Buffer.allocUnsafe()`] but guarantees that newly | ||
created `Buffer` instances never contain old and potentially-sensitive data. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: potentially and sensitive should be two different words?
Ditto on line 99
doc/api/buffer.md
Outdated
using either [`buf.fill(0)`][`buf.fill()`] or written to completely. | ||
new uninitialized `Buffer` of the specified `size`. Because the `Buffer` is | ||
uninitialized, it may contain potentially-sensitive data. Do not use this | ||
method unless you know what you are doing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please avoid you
in the docs I would just strike this last sentence.
Change v6 to 6.0.0. We abandoned v-notation for versions to avoid confusion between v8 (version 8.0.0) and V8 (the JavaScript engine).
Rewording, punctuation, consistent sentence structure and italics, wrap section at 80 characters.
0c8b45c
to
8c184d8
Compare
Nits addressed. Lite CI: https://ci.nodejs.org/job/node-test-pull-request-lite/316/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it worth saying that initialized
means zero-filled?
@jasnell Is this good by you now that the word "you" is gone? |
Yes, except that it is not necessarily zero-filled, but filled with the value of |
Change v6 to 6.0.0. We abandoned v-notation for versions to avoid confusion between v8 (version 8.0.0) and V8 (the JavaScript engine). PR-URL: nodejs#19567 Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]>
PR-URL: nodejs#19567 Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]>
Rewording, punctuation, consistent sentence structure and italics, wrap section at 80 characters. PR-URL: nodejs#19567 Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]>
Landed in 79fa372...d74919c |
Change v6 to 6.0.0. We abandoned v-notation for versions to avoid confusion between v8 (version 8.0.0) and V8 (the JavaScript engine). PR-URL: #19567 Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]>
PR-URL: #19567 Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]>
Rewording, punctuation, consistent sentence structure and italics, wrap section at 80 characters. PR-URL: #19567 Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]>
Rewording, punctuation, consistent sentence structure and italics, wrap
section at 80 characters.
Fix run-on sentence in buffer.md
Change v6 to 6.0.0. We abandoned v-notation for versions to avoid
confusion between v8 (version 8.0.0) and V8 (the JavaScript engine).
Checklist