• Attempt to parse a URL without throwing an error.

    Parameters

    • url: string

      The string to parse.

    Returns URL

    The parsed URL if successful, otherwise null.