MCPcopy
hub / github.com/axios/axios / parseProtocol

Function parseProtocol

lib/helpers/parseProtocol.js:3–6  ·  view source on GitHub ↗
(url)

Source from the content-addressed store, hash-verified

1'use strict';
2
3export default function parseProtocol(url) {
4 const match = /^([-+\w]{1,25}):(?:\/\/)?/.exec(url);
5 return (match && match[1]) || '';
6}

Callers 3

fromDataURIFunction · 0.85
xhr.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected