@vulcan-sql/core
Version:
Core package of VulcanSQL
12 lines • 430 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getUrl = void 0;
const getUrl = (connection) => {
const { ssl, host, port, path = '' } = connection;
const protocol = ssl ? 'https' : 'http';
let urlbase = `${protocol}://${host}`;
urlbase = port ? `${urlbase}:${port}` : urlbase;
return new URL(path, urlbase).href;
};
exports.getUrl = getUrl;
//# sourceMappingURL=url.js.map