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

Function absolutifyPointer

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

Source from the content-addressed store, hash-verified

40765 zl.some((s) => a.indexOf(s) > -1)
40766 )
40767 }
40768 function absolutifyPointer(s, o) {
40769 const [i, a] = s.split('#'),
40770 u = null != o ? o : '',
40771 _ = null != i ? i : ''
40772 let w
40773 if (isHttpUrl(u)) w = resolve(u, _)
40774 else {
40775 const s = resolve(Ll, u),
40776 o = resolve(s, _).replace(Ll, '')
40777 w = _.startsWith('/') ? o : o.substring(1)
40778 }
40779 return a ? `${w}#${a}` : w
40780 }
40781 const Wl = /^([a-z]+:\/\/|\/\/)/i
40782 class JSONRefError extends Go {}

Callers 1

Calls 3

isHttpUrlFunction · 0.85
resolveFunction · 0.85
replaceMethod · 0.80

Tested by

no test coverage detected