URL.canParse - Web documentation
method URL.canParse

Parameters

url: string | URL
optional
base: string | URL

Return Type

boolean