Decodes a base64-encoded string into bytes.
decode(string)
string
A base64-encoded string. Must be correctly padded and not contain any whitespace.
A Uint8Array with decoded bytes.
Throws an error if the string is not a valid base64 string.
base64.decode("AQID/w==")
Uint8Array [1, 2, 3, 255]
base64.decode("AQ")
TypeError: failed to decode data