Hi, I'm playing with this new api, and I thing it could be great to have an `offset` argument on the `setFromBase64/Hex` methods: **Issue:** [on mdn](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array/setFromHex#setting_data_at_a_specific_offset) ```ts const uint8Array = new Uint8Array(8); // Start writing at offset 2 const result = uint8Array.subarray(2).setFromHex("cafed00d"); ``` In my opinion, this feels sub-optimal. **Proposal:** We could mimic the [.set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) method. ```ts interface Uint8Array { setFromHex(input: string, offset?: number): { read: number; written: number; }; } ``` ```ts const uint8Array = new Uint8Array(8); uint8Array.setFromHex("cafed00d", 2); ``` What do you think ?
Hi,
I'm playing with this new api, and I thing it could be great to have an
offsetargument on thesetFromBase64/Hexmethods:Issue: on mdn
In my opinion, this feels sub-optimal.
Proposal:
We could mimic the .set method.
What do you think ?