• Check if the format of a URL is valid or not.

    Parameters

    • url: string

      URL to be checked.

    Returns boolean

    True if the URL is valid, false otherwise.

    Throws

    An error if URL's constructor throws an error other than TypeError.