Fake Mirrors
    Preparing search index...

    Function safeBase64Encode

    • Encodes a Buffer into a URL-safe Base64 string.

      This function uses a standard Base64 encoding and then replaces '+' with '-', '/' with '_', and removes trailing '=' padding to make the result safe for use in URLs and file names.

      Parameters

      • data: Buffer

        The Buffer to encode.

      Returns string

      The URL-safe Base64 string.

      Error If Base64 encoding fails.