Ir a la consola

An immutable object representing an array of bytes.

Index

Constructors

Private constructor

Methods

isEqual

  • isEqual(other: Blob): boolean
  • Returns true if this Blob is equal to the provided one.

    Parameters

    • other: Blob

      The Blob to compare against.

    Returns boolean

    true if this Blob is equal to the provided one.

toBase64

  • toBase64(): string
  • Returns the bytes of a Blob as a Base64-encoded string.

    Returns string

    The Base64-encoded string created from the Blob object.

toUint8Array

  • toUint8Array(): Uint8Array
  • Returns the bytes of a Blob in a new Uint8Array.

    Returns Uint8Array

    The Uint8Array created from the Blob object.

Static fromBase64String

  • fromBase64String(base64: string): Blob
  • Creates a new Blob from the given Base64 string, converting it to bytes.

    Parameters

    • base64: string

      The Base64 string used to create the Blob object.

    Returns Blob

Static fromUint8Array

  • fromUint8Array(array: Uint8Array): Blob
  • Creates a new Blob from the given Uint8Array.

    Parameters

    • array: Uint8Array

      The Uint8Array used to create the Blob object.

    Returns Blob