Skip to content

base64/hex methods missing from Uint8Array #60612

Closed
@printfn

Description

@printfn

⚙ 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

new TextEncoder().encode('Hello World').toBase64()
// "SGVsbG8gV29ybGQ="

Documentation Link

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array/toBase64

https://github.com/tc39/proposal-arraybuffer-base64

Metadata

Metadata

Assignees

No one assigned

    Labels

    Working as IntendedThe behavior described is the intended behavior; this is not a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions