sindresorhus/normalize-url

foo:bar can not be normalized?

Closed this issue · 2 comments

foo:bar is automatically converted into http:foo:bar by this lib.

Yes, we assume // in the scheme. I guess we could loosen that. I don't remember if we made it strict for a reason.

urlString = urlString.replace(/^(?!(?:\w+:)?\/\/)|^\/\//, options.defaultProtocol);

Fixed by 882cb84