-
-
Notifications
You must be signed in to change notification settings - Fork 123
Closed
Description
I wanted to use normalize-url in my project, but I noticed a problem
In the documentation, one of the examples does not work (the one I need :))
normalizeUrl('sindresorhus.com:123', {
removeExplicitPort: true
});
//=> 'http://sindresorhus.com'
t.is(normalizeUrl('sindresorhus.com:123', options), 'http://sindresorhus.com');
The test returned:
'sindresorhus.com:123'
so there is an issue
I looked at the code and noticed that the hasCustomProtocol function returns the wrong value
So I prepared a quick fix, but I'm not a URL specialist, my PR is rather illustrative, so feel free to close it
#186
My thought was that there are no dots in the protocol, and there is always a dot between the domain name and the TLD, so did this
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels