MCPcopy Index your code
hub / github.com/react/create-react-app / extractProtocol

Function extractProtocol

packages/react-error-overlay/fixtures/bundle.mjs:7937–7945  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

7935 * @api private
7936 */
7937function 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.

Callers 1

URLFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected