MCPcopy Index your code
hub / github.com/mozilla/source-map / getURLType

Function getURLType

lib/util.js:237–244  ·  view source on GitHub ↗
(url)

Source from the content-addressed store, hash-verified

235
236const ABSOLUTE_SCHEME = /^[A-Za-z0-9\+\-\.]+:/;
237function getURLType(url) {
238 if (url[0] === "/") {
239 if (url[1] === "/") return "scheme-relative";
240 return "path-absolute";
241 }
242
243 return ABSOLUTE_SCHEME.test(url) ? "absolute" : "path-relative";
244}
245
246/**
247 * Given two URLs that are assumed to be on the same

Callers 4

createSafeHandlerFunction · 0.85
joinFunction · 0.85
relativeIfPossibleFunction · 0.85
computeSourceURLFunction · 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…