Function isDataUrl

  • returns true if the given string is a data url in the data:[<mediatype>][;base64],<data> format. (this will not test the validity of the Data or Base64 encoding)

    Parameters

    • str: string

      the string (url) to be tested

    Returns boolean

    true if the string is a data url