Uh oh!
There was an error while loading. Please reload this page.
doc: add Buffer#subarray() and add note about Uint8Array#slice() - #28101
doc: add Buffer#subarray() and add note about Uint8Array#slice()#28101gfx wants to merge 6 commits into
Conversation
I don't think we need to document inherited methods like If anything, only the new note should be added to the description for |
Really? There are lots of methods and properties in the doc, directly inherited from
I think |
mscdex
commented
Jun 7, 2019
Right, I don't agree those need to be there either. IMO there is no need to duplicate documentation (already available at places like MDN) for those properties/methods unless there is some behavioral/semantic difference with node's implementation. Making it clear that Even within node's own documentation we generally don't duplicate between similar/super objects (e.g. |
sam-github
commented
Jun 7, 2019
#28101 (comment) makes sense to me. I wonder, do our docs predate Buffer being derived from Uint8Array? |
mscdex
commented
Jun 8, 2019
Definitely. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-Authored-By: Anna Henningsen <github@addaleax.net>
Co-Authored-By: Anna Henningsen <github@addaleax.net>
gfx
commented
Jun 10, 2019
Applied suggested changes! |
addaleax
commented
Jun 10, 2019
I’ll land this tomorrow if there are no objections to that. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-Authored-By: Rich Trott <rtrott@gmail.com>
Co-Authored-By: Rich Trott <rtrott@gmail.com>
Co-Authored-By: Rich Trott <rtrott@gmail.com>
gfx
commented
Jun 11, 2019
Thanks, @Trott ! |
Trott
commented
Jun 11, 2019
Trott
commented
Jun 13, 2019
Landed in ee16787 |
PR-URL: nodejs#28101 Refs: nodejs#28087 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
refs: #28087
Buffer#subarray(); its content is just copied from#slice()Buffer#slice()because of its incompatibility with its superclass's method, and also added how to useUint8Array.prototype.slice()to get a copy of sliceChecklist
[ ]make -j4 test(UNIX), orvcbuild test(Windows) passes[ ] tests and/or benchmarks are included