MCPcopy Create free account
hub / github.com/dataease/SQLBot / es_compile

Function es_compile

frontend/public/swagger-ui-bundle.js:44193–44212  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

44191 return String(s).replace(/~/g, '~0').replace(/\//g, '~1')
44192 }
44193 const Up = class JSONPointerCompileError extends Ip {},
44194 es_compile = (s) => {
44195 if (!Array.isArray(s))
44196 throw new TypeError('Reference tokens must be a list of strings or numbers')
44197 try {
44198 return 0 === s.length
44199 ? ''
44200 : `/${s
44201 .map((s) => {
44202 if ('string' != typeof s && 'number' != typeof s)
44203 throw new TypeError('Reference token must be a string or number')
44204 return es_escape(String(s))
44205 })
44206 .join('/')}`
44207 } catch (o) {
44208 throw new Up('Unexpected error during JSON Pointer compilation', {
44209 cause: o,
44210 referenceTokens: s,
44211 })
44212 }
44213 }
44214 const Vp = class TraceBuilder {
44215 #e

Callers 2

resolveOpenAPI31StrategyFunction · 0.85

Calls 3

es_escapeFunction · 0.85
isArrayMethod · 0.45
mapMethod · 0.45

Tested by

no test coverage detected