Open printfn opened 15 hours ago
ESNext
Uint8Array.fromBase64() Uint8Array.fromHex() Uint8Array.prototype.setFromBase64() Uint8Array.prototype.setFromHex() Uint8Array.prototype.toBase64() Uint8Array.prototype.toHex()
Uint8Array.fromBase64()
Uint8Array.fromHex()
Uint8Array.prototype.setFromBase64()
Uint8Array.prototype.setFromHex()
Uint8Array.prototype.toBase64()
Uint8Array.prototype.toHex()
These functions are implemented in stable Firefox and in the Safari Technology Preview.
new TextEncoder().encode('Hello World').toBase64() // "SGVsbG8gV29ybGQ="
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array/toBase64
https://github.com/tc39/proposal-arraybuffer-base64
I would argue that support in a beta version does not fully count as "two or more major browser engines."
⚙ Compilation target
ESNext
⚙ Library
ESNext
Missing / Incorrect Definition
Uint8Array.fromBase64()
Uint8Array.fromHex()
Uint8Array.prototype.setFromBase64()
Uint8Array.prototype.setFromHex()
Uint8Array.prototype.toBase64()
Uint8Array.prototype.toHex()
These functions are implemented in stable Firefox and in the Safari Technology Preview.
Sample Code
Documentation Link
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array/toBase64
https://github.com/tc39/proposal-arraybuffer-base64