Properly parse urls without "//" after the protocol#22
Properly parse urls without "//" after the protocol#223rd-Eden merged 2 commits intounshiftio:masterfrom iamtheib:master
Conversation
index.js
Outdated
| var url = this; | ||
|
|
||
| if ('query' === part) { | ||
| if (fnOrNoSlashes && 'function' !== typeof fnOrNoSlashes) { |
There was a problem hiding this comment.
I would not add this, it will throw an error anyway if the given argument is not function.
It will save few bytes on the browser.
|
Left some comments but LGTM. It would be nice to have another pair of eyes here anyway. |
index.js
Outdated
| ]; | ||
|
|
||
| /** | ||
| * Extract protocol information from a URL |
There was a problem hiding this comment.
Could you JSDoc comment this function? So it documented what it returns, and what the function expects to receive?
There was a problem hiding this comment.
It is meant to be an internal/private function not exposed in the API. I can still use JSDoc for it I guess
|
Minor comments, but LGTM otherwise |
|
Made the suggested changes. @lpinca I left the |
| * Extract protocol information from a URL with/without double slash ("//") | ||
| * | ||
| * @param {String} address URL we want to extract from. | ||
| * @return {ProtocolExtract} Extracted information |
There was a problem hiding this comment.
It was ok with just Object but thanks for the effort.
|
👍 |
|
Ill release a new minor in a bit. Thanks for your contribution |
|
No problem. Happy to help. |
|
This test fails on IE, we need to fix it. |
|
Yes. Just seeing it. It has to do with the expected error message. |
|
On my way. |
|
End of this line can probably be changed to |
|
Published as 1.1.0 |
Fixes issue #8