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

Function Url

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

Source from the content-addressed store, hash-verified

23865 )
23866 }
23867 function Url(s, o, i) {
23868 if (((s = (s = trimLeft(s)).replace(w, '')), !(this instanceof Url)))
23869 return new Url(s, o, i)
23870 var _,
23871 x,
23872 C,
23873 j,
23874 $,
23875 U,
23876 V = B.slice(),
23877 z = typeof o,
23878 Y = this,
23879 Z = 0
23880 for (
23881 'object' !== z && 'string' !== z && ((i = o), (o = null)),
23882 i && 'function' != typeof i && (i = u.parse),
23883 _ = !(x = extractProtocol(s || '', (o = lolcation(o)))).protocol && !x.slashes,
23884 Y.slashes = x.slashes || (_ && o.slashes),
23885 Y.protocol = x.protocol || o.protocol || '',
23886 s = x.rest,
23887 (('file:' === x.protocol && (2 !== x.slashesCount || L.test(s))) ||
23888 (!x.slashes && (x.protocol || x.slashesCount < 2 || !isSpecial(Y.protocol)))) &&
23889 (V[3] = [/(.*)/, 'pathname']);
23890 Z < V.length;
23891 Z++
23892 )
23893 'function' != typeof (j = V[Z])
23894 ? ((C = j[0]),
23895 (U = j[1]),
23896 C != C
23897 ? (Y[U] = s)
23898 : 'string' == typeof C
23899 ? ~($ = '@' === C ? s.lastIndexOf(C) : s.indexOf(C)) &&
23900 ('number' == typeof j[2]
23901 ? ((Y[U] = s.slice(0, $)), (s = s.slice($ + j[2])))
23902 : ((Y[U] = s.slice($)), (s = s.slice(0, $))))
23903 : ($ = C.exec(s)) && ((Y[U] = $[1]), (s = s.slice(0, $.index))),
23904 (Y[U] = Y[U] || (_ && j[3] && o[U]) || ''),
23905 j[4] && (Y[U] = Y[U].toLowerCase()))
23906 : (s = j(s, Y))
23907 ;(i && (Y.query = i(Y.query)),
23908 _ &&
23909 o.slashes &&
23910 '/' !== Y.pathname.charAt(0) &&
23911 ('' !== Y.pathname || '' !== o.pathname) &&
23912 (Y.pathname = (function resolve(s, o) {
23913 if ('' === s) return o
23914 for (
23915 var i = (o || '/').split('/').slice(0, -1).concat(s.split('/')),
23916 a = i.length,
23917 u = i[a - 1],
23918 _ = !1,
23919 w = 0;
23920 a--;
23921 )
23922 '.' === i[a]
23923 ? i.splice(a, 1)
23924 : '..' === i[a]

Callers

nothing calls this directly

Calls 13

trimLeftFunction · 0.85
extractProtocolFunction · 0.85
lolcationFunction · 0.85
isSpecialFunction · 0.85
replaceMethod · 0.80
concatMethod · 0.80
iFunction · 0.70
aFunction · 0.70
jFunction · 0.50
execMethod · 0.45
unshiftMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected