* Extract protocol information from a URL with/without double slash ("//"). * * @param {String} address URL we want to extract from. * @return {ProtocolExtract} Extracted information. * @api private
(address)
| 7935 | * @api private |
| 7936 | */ |
| 7937 | function extractProtocol(address) { |
| 7938 | var match = protocolre.exec(address); |
| 7939 | |
| 7940 | return { |
| 7941 | protocol: match[1] ? match[1].toLowerCase() : '', |
| 7942 | slashes: !!match[2], |
| 7943 | rest: match[3] |
| 7944 | }; |
| 7945 | } |
| 7946 | |
| 7947 | /** |
| 7948 | * Resolve a relative URL pathname against a base URL pathname. |