MCPcopy Index your code
hub / github.com/webpack/webpack-dev-server / isAbsoluteURL

Method isAbsoluteURL

lib/Server.js:414–423  ·  view source on GitHub ↗

* @param {string} URL url * @returns {boolean} true when URL is absolute, otherwise false

(URL)

Source from the content-addressed store, hash-verified

412 * @returns {boolean} true when URL is absolute, otherwise false
413 */
414 static isAbsoluteURL(URL) {
415 // Don't match Windows paths `c:\`
416 if (/^[a-zA-Z]:\\/.test(URL)) {
417 return false;
418 }
419
420 // Scheme: https://tools.ietf.org/html/rfc3986#section-3.1
421 // Absolute URL: https://tools.ietf.org/html/rfc3986#section-4.3
422 return /^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(URL);
423 }
424
425 /**
426 * @param {string} gatewayOrFamily gateway or family

Callers 2

getStaticItemMethod · 0.80
openBrowserMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected