Webigail
    Preparing search index...

    Represents an object that is helpful in building a data url with support for data encoding.

    Index

    Constructors

    Methods

    • Sets the data buffer.

      Parameters

      • data: string | Uint8Array<ArrayBufferLike>

        The data to set. If you pass a raw string, then the input encoding is expected to be utf8.

      Returns this

      This object.

    • Builds the url string and returns it.

      Returns string

      The url string.

    • Sets the output encoding.

      If you output encode the data as utf8, then it will be properly escaped.

      Parameters

      • encoding: "base64" | "utf8"

        The output encoding.

      Returns this

      This object.

    • Sets the mime type.

      Parameters

      • type: string

        The mime type.

      Returns this

      This object.

    • Parses an existing data url and sets all properties.

      Parameters

      • url: string

        The url to parse.

      Returns this

      This object.