Commit 2f202c9
doc: clarify array args to Buffer.from()
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>1 parent 286c358 commit 2f202c9
1 file changed
+7
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1114 | 1114 | | |
1115 | 1115 | | |
1116 | 1116 | | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
1117 | 1123 | | |
1118 | 1124 | | |
1119 | 1125 | | |
| |||
5470 | 5476 | | |
5471 | 5477 | | |
5472 | 5478 | | |
| 5479 | + | |
5473 | 5480 | | |
5474 | 5481 | | |
5475 | 5482 | | |
| |||
0 commit comments