You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 28, 2025. It is now read-only.
Uint8Array.fromBase64Into and Uint8Array.fromHexInto don't match the normal naming and placement of methods:
Array.from, %TypedArray%.from, and the new Uint8Array.fromBase64 and Uint8Array.fromHex create new objects, indicated by the "from" prefix. from{Base64,Hex}Into don't create a new object, but instead modify existing objects. [1]
from{Base64,Hex}Into modify existing objects, but aren't placed on Uint8Array.prototype, but are instead methods placed on the constructor Uint8Array. [2]
I don't have concrete suggestions how to change this, but at least I wanted to open an issue, so in case the current names and placements will stay, it's documented that this was an intentional design choice.
[1] Here we could argue that the additional suffix "Into" indicates that the method doesn't create a new object.
[2] Here I'd guess the obvious explanation is that this improves discoverability when the names are similar to Uint8Array.from{Base64,Hex}.