What is the problem this feature will solve?
Support for this would significantly reduce boilerplate code.
(issue template copied from denoland/deno#25051)
What is the feature you are proposing to solve the problem?
The tc39 Uint8Array to/from base64 and hex proposal is stage 3.
Examples:
let arr = new Uint8Array([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100]);
console.log(arr.toBase64());
// 'SGVsbG8gV29ybGQ='
console.log(arr.toHex());
// '48656c6c6f20576f726c64'
let string = 'SGVsbG8gV29ybGQ=';
console.log(Uint8Array.fromBase64(string));
// Uint8Array([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100])
string = '48656c6c6f20576f726c64';
console.log(Uint8Array.fromHex(string));
// Uint8Array([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100])
Full spec.
What alternatives have you considered?
No response
What is the problem this feature will solve?
Support for this would significantly reduce boilerplate code.
(issue template copied from denoland/deno#25051)
What is the feature you are proposing to solve the problem?
The tc39 Uint8Array to/from base64 and hex proposal is stage 3.
Examples:
Full spec.
What alternatives have you considered?
No response