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