MCPcopy Create free account
hub / github.com/axios/axios / normalizeURLForProtocolCheck

Function normalizeURLForProtocolCheck

lib/helpers/normalizeURLForProtocolCheck.js:12–24  ·  view source on GitHub ↗
(url)

Source from the content-addressed store, hash-verified

10 * @returns {string}
11 */
12export default function normalizeURLForProtocolCheck(url) {
13 if (typeof url !== 'string') {
14 return url;
15 }
16
17 let start = 0;
18
19 while (start < url.length && url.charCodeAt(start) <= 0x20) {
20 start++;
21 }
22
23 return url.slice(start).replace(urlParserControlCharacters, '');
24}

Callers 2

onloadendFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected