MCPcopy
hub / github.com/webpack/sass-loader / getURLType

Function getURLType

src/utils.js:713–727  ·  view source on GitHub ↗

* @param {string} source source * @returns {"absolute" | "scheme-relative" | "path-absolute" | "path-relative"} a type of URL

(source)

Source from the content-addressed store, hash-verified

711 * @returns {"absolute" | "scheme-relative" | "path-absolute" | "path-relative"} a type of URL
712 */
713function getURLType(source) {
714 if (source[0] === "/") {
715 if (source[1] === "/") {
716 return "scheme-relative";
717 }
718
719 return "path-absolute";
720 }
721
722 if (IS_NATIVE_WIN32_PATH.test(source)) {
723 return "path-absolute";
724 }
725
726 return ABSOLUTE_SCHEME.test(source) ? "absolute" : "path-relative";
727}
728
729/**
730 * @param {RawSourceMap} map source map

Callers 1

normalizeSourceMapFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…