We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3ae78a1 commit c0f4dfcCopy full SHA for c0f4dfc
src/preamble.js
@@ -829,6 +829,8 @@ function isAbsoluteUrl(url) {
829
return /^(?:[a-z]+:)?\/\//i.test(url);
830
}
831
832
+// Joins relative URL 'b' to URL 'a'. 'a' may be empty, in which case 'b' is returned.
833
+// If 'b' is an absolute URL, then 'a' is ignored and 'b' is returned as-is as well.
834
function joinUrl(a, b) {
835
#if ASSERTIONS
836
if (a && !a.endsWith('/')) throw 'First parameter to joinUrl() should end in /!';
0 commit comments