Library API
    Preparing search index...

    Function base64ToBuffer

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

      Parameters

      • base64: string

        The Base64 string to decode

      Returns Uint8Array<ArrayBuffer>

      A Uint8Array of the decoded data

      const buf = base64ToBuffer('aGk=');