Encodes the given string into Base64URL.

Type signature

(text: string, context?: EncodeContext) => string

Examples

encode("<<???>>");
// ⇒ "PDw_Pz8-Pg"
Try in REPL

Questions

  • How to encode a string as Base64URL?

TypeScript sourceJavaScript source