Skip to content

url

Contains a utility function for validating URLs.

FunctionDescription
isFileUrlDetermines whether a given string is a file:// URL.
isUrlDetermines whether a given string is a valid URL
normalizeFileUrlNormalizes a file:// URL to a pretty form by converting backslashes to forward slashes. The URL is expected to already be decoded. Non-file:// URLs are returned unchanged.