UNPKG

396 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.getURL = void 0;
4function getURL(base, url) {
5 if (!base.startsWith('http://') && !base.startsWith('https://')) {
6 base = 'http://' + base;
7 }
8 try {
9 return new URL(url, base).href;
10 }
11 catch (e) {
12 return '';
13 }
14}
15exports.getURL = getURL;
16//# sourceMappingURL=url.js.map
\No newline at end of file