MCPcopy Index your code
hub / github.com/dataease/SQLBot / buildBaseUrl

Function buildBaseUrl

frontend/public/swagger-ui-bundle.js:36119–36127  ·  view source on GitHub ↗
(s, o)

Source from the content-addressed store, hash-verified

36117 function isAbsoluteUrl(s) {
36118 return s.match(/^(?:[a-z]+:)?\/\//i)
36119 }
36120 function buildBaseUrl(s, o) {
36121 return s
36122 ? isAbsoluteUrl(s)
36123 ? (function addProtocol(s) {
36124 return s.match(/^\/\//i) ? `${window.location.protocol}${s}` : s
36125 })(s)
36126 : new URL(s, o).href
36127 : o
36128 }
36129 function safeBuildUrl(s, o, { selectedServer: i = '' } = {}) {
36130 try {

Callers 1

safeBuildUrlFunction · 0.85

Calls 1

isAbsoluteUrlFunction · 0.85

Tested by

no test coverage detected