@edgetoken/core
    Preparing search index...

    Function base64UrlEncode

    • Encodes a string or byte array into an unpadded URL-safe Base64 string (RFC 4648 ยง5).

      Replaces + with -, / with _, and strips trailing padding =.

      Parameters

      • input: string | Uint8Array<ArrayBufferLike>

        The string or byte array to encode.

      Returns string

      The URL-safe Base64-encoded string without padding.

      const encoded = base64UrlEncode("sub=12345");