MCPcopy Create free account
hub / github.com/GNOME/gjs / urlGenerate

Function urlGenerate

modules/internal/source-map/util.js:50–69  ·  view source on GitHub ↗
(aParsedUrl)

Source from the content-addressed store, hash-verified

48}
49
50export function urlGenerate(aParsedUrl) {
51 var url = '';
52 if (aParsedUrl.scheme) {
53 url += aParsedUrl.scheme + ':';
54 }
55 url += '//';
56 if (aParsedUrl.auth) {
57 url += aParsedUrl.auth + '@';
58 }
59 if (aParsedUrl.host) {
60 url += aParsedUrl.host;
61 }
62 if (aParsedUrl.port) {
63 url += ":" + aParsedUrl.port
64 }
65 if (aParsedUrl.path) {
66 url += aParsedUrl.path;
67 }
68 return url;
69}
70
71export function isAbsolute(aPath) {
72 return aPath.charAt(0) === '/' || urlRegexp.test(aPath);

Callers 3

normalizeFunction · 0.85
joinFunction · 0.85
computeSourceURLFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected