Skip to content
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

Correctly get an ArrayBuffer's length #31632

Closed
wants to merge 1 commit into from
Closed

Correctly get an ArrayBuffer's length #31632

wants to merge 1 commit into from

Conversation

tsabolov
Copy link
Contributor

@tsabolov tsabolov commented Feb 4, 2020

ArrayBuffer instances do not have .length property. Instead they have .byteLength property.
Fixed that in the description of new Buffer(arrayBuffer[, byteOffset[, length]]) and Buffer.from(arrayBuffer[, byteOffset[, length]]).

Checklist

`ArrayBuffer` instances do not have `.length` property. Instead they have `.byteLength` property.
Fixed that in the description of `new Buffer(arrayBuffer[, byteOffset[, length]])` and `Buffer.from(arrayBuffer[, byteOffset[, length]])`.
@nodejs-github-bot nodejs-github-bot added buffer Issues and PRs related to the buffer subsystem. doc Issues and PRs related to the documentations. labels Feb 4, 2020
@addaleax
Copy link
Member

addaleax commented Feb 7, 2020

Landed in 10d378e, thanks for the PR! 🎉

@addaleax addaleax closed this Feb 7, 2020
addaleax pushed a commit that referenced this pull request Feb 7, 2020
`ArrayBuffer` instances do not have `.length` property.
Instead they have `.byteLength` property.
Fixed that in the description of
`new Buffer(arrayBuffer[, byteOffset[, length]])` and
`Buffer.from(arrayBuffer[, byteOffset[, length]])`.

PR-URL: #31632
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
codebytere pushed a commit that referenced this pull request Feb 17, 2020
`ArrayBuffer` instances do not have `.length` property.
Instead they have `.byteLength` property.
Fixed that in the description of
`new Buffer(arrayBuffer[, byteOffset[, length]])` and
`Buffer.from(arrayBuffer[, byteOffset[, length]])`.

PR-URL: #31632
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
@codebytere codebytere mentioned this pull request Feb 17, 2020
codebytere pushed a commit that referenced this pull request Mar 15, 2020
`ArrayBuffer` instances do not have `.length` property.
Instead they have `.byteLength` property.
Fixed that in the description of
`new Buffer(arrayBuffer[, byteOffset[, length]])` and
`Buffer.from(arrayBuffer[, byteOffset[, length]])`.

PR-URL: #31632
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
codebytere pushed a commit that referenced this pull request Mar 17, 2020
`ArrayBuffer` instances do not have `.length` property.
Instead they have `.byteLength` property.
Fixed that in the description of
`new Buffer(arrayBuffer[, byteOffset[, length]])` and
`Buffer.from(arrayBuffer[, byteOffset[, length]])`.

PR-URL: #31632
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
@codebytere codebytere mentioned this pull request Mar 17, 2020
codebytere pushed a commit that referenced this pull request Mar 30, 2020
`ArrayBuffer` instances do not have `.length` property.
Instead they have `.byteLength` property.
Fixed that in the description of
`new Buffer(arrayBuffer[, byteOffset[, length]])` and
`Buffer.from(arrayBuffer[, byteOffset[, length]])`.

PR-URL: #31632
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
buffer Issues and PRs related to the buffer subsystem. doc Issues and PRs related to the documentations.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants