-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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: Clarify API Buffer.concat #3255
doc: Clarify API Buffer.concat #3255
Conversation
Add a simple example. Change grammar slightly. Closes #3219
@@ -127,7 +127,7 @@ Example: | |||
### Class Method: Buffer.concat(list[, totalLength]) | |||
|
|||
* `list` {Array} List of Buffer objects to concat | |||
* `totalLength` {Number} Total length of the buffers when concatenated | |||
* `totalLength` {Number} Total length of the buffers list when concatenated |
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.
But it's not the length of the list, is it? It's the total byte size of all buffers combined if I'm not mistaken.
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.
perhaps "buffers in the list" would work better?
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.
yes it would, thanks :)
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.
No problem. Thank you.
LGTM |
I don't think an example is needed. TBH I think the current documentation is fine and the "in the list" part can be inferred. |
@seishun ... more examples are almost never a bad thing to have in documentation. |
I'm cool w/ this. LGTM |
* Add a simple example for buffer.concat * Change grammar slightly. Fixes: #3219 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Trevor Norris <[email protected]> PR-URL: #3255
Landed in e32aca6. @Martii , I fixed up the commit log just a bit to match the common style. |
should this be in LTS /cc @jasnell |
@thealphanerd +1
|
@jasnell |
* Add a simple example for buffer.concat * Change grammar slightly. Fixes: #3219 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Trevor Norris <[email protected]> PR-URL: #3255
Landed in v4.x-staging in 4afcf57 |
* Add a simple example for buffer.concat * Change grammar slightly. Fixes: #3219 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Trevor Norris <[email protected]> PR-URL: #3255
* Add a simple example for buffer.concat * Change grammar slightly. Fixes: #3219 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Trevor Norris <[email protected]> PR-URL: #3255
Fixes: #3219