Decodes the given Base64URL back into a byte array.

Type signature

(text: string, context?: DecodeContext) => number[]

Examples

decodeBytes("w4Jnw6vCp20-bBsQfA");
// ⇒ [0xc2, 0x67, 0xeb, 0xa7, 0x6d, 0x3e, 0x6c, 0x1b, 0x10, 0x7c]
Try in REPL

Questions

  • How to decode Base64URL into a byte array?

TypeScript sourceJavaScript source