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 <[email protected]>
Reviewed-By: Yongsheng Zhang <[email protected]>
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
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 <[email protected]>
Reviewed-By: Yongsheng Zhang <[email protected]>
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
@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 <[email protected]>
Reviewed-By: Yongsheng Zhang <[email protected]>
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
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 <[email protected]>
Reviewed-By: Yongsheng Zhang <[email protected]>
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
@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 <[email protected]>
Reviewed-By: Yongsheng Zhang <[email protected]>
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
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