Library API
    Preparing search index...

    Function bufferToBase64

    • Encodes a raw Uint8Array into a Base64 string. Uses native Buffer in Node.js and fallbacks to btoa in browsers.

      Parameters

      • buffer: Uint8Array

        The raw Uint8Array to encode

      Returns string

      The Base64 string representation

      const b64 = bufferToBase64(new Uint8Array([104, 105]));