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

Function extractProtocol

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

Source from the content-addressed store, hash-verified

23839 )
23840 }
23841 function extractProtocol(s, o) {
23842 ;((s = (s = trimLeft(s)).replace(w, '')), (o = o || {}))
23843 var i,
23844 a = j.exec(s),
23845 u = a[1] ? a[1].toLowerCase() : '',
23846 _ = !!a[2],
23847 x = !!a[3],
23848 C = 0
23849 return (
23850 _
23851 ? x
23852 ? ((i = a[2] + a[3] + a[4]), (C = a[2].length + a[3].length))
23853 : ((i = a[2] + a[4]), (C = a[2].length))
23854 : x
23855 ? ((i = a[3] + a[4]), (C = a[3].length))
23856 : (i = a[4]),
23857 'file:' === u
23858 ? C >= 2 && (i = i.slice(2))
23859 : isSpecial(u)
23860 ? (i = a[4])
23861 : u
23862 ? _ && (i = i.slice(2))
23863 : C >= 2 && isSpecial(o.protocol) && (i = a[4]),
23864 { protocol: u, slashes: _ || isSpecial(u), slashesCount: C, rest: i }
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)

Callers 1

UrlFunction · 0.85

Calls 4

trimLeftFunction · 0.85
isSpecialFunction · 0.85
replaceMethod · 0.80
execMethod · 0.45

Tested by

no test coverage detected