Skip to content

doc: clarify array args to Buffer.from()#48274

Merged
nodejs-github-bot merged 3 commits into
nodejs:mainfrom
bengl:bengl/bufdocarray
Jun 2, 2023
Merged

doc: clarify array args to Buffer.from()#48274
nodejs-github-bot merged 3 commits into
nodejs:mainfrom
bengl:bengl/bufdocarray

Conversation

@bengl
Copy link
Copy Markdown
Member

@bengl bengl commented May 31, 2023

The code for Buffer.from() treats non-Buffer and non-Uint8Array Array-likes as Arrays. This creates some confusion when passing various TypedArrays to Buffer.from(). The documentation now reflects the actual behavior.

Fixes: #28725

The code for Buffer.from() treats non-Buffer and non-Uint8Array
Array-likes as Arrays. This creates some confusion when passing various
TypedArrays to Buffer.from(). The documentation now reflects the actual
behavior.

Fixes: nodejs#28725
@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 May 31, 2023
Comment thread doc/api/buffer.md Outdated
Comment thread doc/api/buffer.md Outdated
Comment thread doc/api/buffer.md Outdated
Comment thread doc/api/buffer.md Outdated
@bengl bengl force-pushed the bengl/bufdocarray branch from 513d0fe to 2a6c6e0 Compare June 1, 2023 13:08
@Trott Trott added commit-queue Add this label to land a pull request using GitHub Actions. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. labels Jun 1, 2023
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Jun 2, 2023
@nodejs-github-bot nodejs-github-bot merged commit e9e1181 into nodejs:main Jun 2, 2023
@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

Landed in e9e1181

@Trott Trott deleted the bengl/bufdocarray branch June 3, 2023 15:42
targos pushed a commit that referenced this pull request Jun 4, 2023
The code for Buffer.from() treats non-Buffer and non-Uint8Array
Array-likes as Arrays. This creates some confusion when passing various
TypedArrays to Buffer.from(). The documentation now reflects the actual
behavior.

Fixes: #28725
PR-URL: #48274
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Harshitha K P <harshitha014@gmail.com>
@targos targos mentioned this pull request Jun 4, 2023
danielleadams pushed a commit that referenced this pull request Jul 6, 2023
The code for Buffer.from() treats non-Buffer and non-Uint8Array
Array-likes as Arrays. This creates some confusion when passing various
TypedArrays to Buffer.from(). The documentation now reflects the actual
behavior.

Fixes: #28725
PR-URL: #48274
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Harshitha K P <harshitha014@gmail.com>
MoLow pushed a commit to MoLow/node that referenced this pull request Jul 6, 2023
The code for Buffer.from() treats non-Buffer and non-Uint8Array
Array-likes as Arrays. This creates some confusion when passing various
TypedArrays to Buffer.from(). The documentation now reflects the actual
behavior.

Fixes: nodejs#28725
PR-URL: nodejs#48274
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Harshitha K P <harshitha014@gmail.com>
Ceres6 pushed a commit to Ceres6/node that referenced this pull request Aug 14, 2023
The code for Buffer.from() treats non-Buffer and non-Uint8Array
Array-likes as Arrays. This creates some confusion when passing various
TypedArrays to Buffer.from(). The documentation now reflects the actual
behavior.

Fixes: nodejs#28725
PR-URL: nodejs#48274
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Harshitha K P <harshitha014@gmail.com>
Ceres6 pushed a commit to Ceres6/node that referenced this pull request Aug 14, 2023
The code for Buffer.from() treats non-Buffer and non-Uint8Array
Array-likes as Arrays. This creates some confusion when passing various
TypedArrays to Buffer.from(). The documentation now reflects the actual
behavior.

Fixes: nodejs#28725
PR-URL: nodejs#48274
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Harshitha K P <harshitha014@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. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. doc Issues and PRs related to the documentations.

7 participants