ducjs - v4.4.2
    Preparing search index...

    Function isValidUint8Array

    • Validates a value to ensure it is or can be converted to a non-empty Uint8Array.

      This function handles three types of input:

      1. An existing Uint8Array.
      2. A Base64-encoded string.
      3. A full Data URL string (e.g., "data:image/png;base64,...").

      Parameters

      • value: unknown

        The unknown value to validate.

      Returns Uint8Array<ArrayBufferLike> | undefined

      A valid, non-empty Uint8Array if the conversion is successful, otherwise undefined.