Skip to content

isURL

function isURL(input): input is `file://${string}` | `https://${string}` | `http://${string}`;

Check if the string is an URL

any

input

input is `file://${string}` | `https://${string}` | `http://${string}`

true when the input is an URL with a supported protocol