IonicaBizau/parse-url

parseUrl('//test.com') reports protocol as file

Closed this issue · 1 comments

When dealing with relative urls, I believe it should report the protocol as null for relative protocol urls, as a file url looks like file:///test/file.txt

Well, this is actually intended. Related to this, we may want to check if the input is a valid filepath.

You can use parseUrl("//test/com", true) to normalize the url first.