| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
The typed array's underlying ArrayBuffer is used in `Buffer.from`. Let's respect it's .byteOffset or .byteLength (i.e. position within the parent ArrayBuffer). Fixes: nodejs#8001 PR-URL: nodejs#8002 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Let's test typed arrays which have a .byteOffset and .byteLength (i.e. typed arrays that are slices of parent typed arrays). PR-URL: nodejs#8002 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Which API is that? |
Sorry, something went wrong.
|
@feross That would be the three-argument new Buffer(arrayBuffer, offset, length) variant of the Buffer constructor |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This is a backport of #8002 to v4.
Note, the exact API used to implement this doesn't seem to exist in v4, so I combined new Buffer() and slice().
R= @thealphanerd @feross