For encoding to/from base64urls implementing RFC 4648 base64url standard
89
Build a module that converts textual or binary payloads to and from URL-safe Base64 strings while honoring caller-specified character encodings and rejecting unsupported inputs.
Encode strings or buffers into padding-free, URL-safe Base64 strings. Default to UTF-8 when no encoding is provided; honor a supplied encoding for string inputs.
Reject inputs that are neither strings nor buffers.
42) throws a TypeError @testDecode URL-safe Base64 strings back to text using the requested encoding, defaulting to UTF-8 when omitted.
0xff, 0xff @test@generates
export function encodePayload(input: string | Buffer, encoding?: BufferEncoding): string;
export function decodePayload(encoded: string, encoding?: BufferEncoding): string;Provides URL-safe Base64 encoding/decoding utilities with optional encoding support.
Install with Tessl CLI
npx tessl i tessl/npm-base64url