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

Function extract

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

Source from the content-addressed store, hash-verified

40989 : Promise.resolve(o)
40990 : ((Jl[s] = Yl.fetchJSON(s).then((o) => ((Jl[s] = o), o))), Jl[s])
40991 }
40992 function extract(s, o) {
40993 const i = jsonPointerToArray(s)
40994 if (i.length < 1) return o
40995 const a = Wo.getIn(o, i)
40996 if (void 0 === a)
40997 throw new JSONRefError(`Could not resolve pointer: ${s} does not exist in document`, {
40998 pointer: s,
40999 })
41000 return a
41001 }
41002 function jsonPointerToArray(s) {
41003 if ('string' != typeof s) throw new TypeError('Expected a string, got a ' + typeof s)

Callers 1

extractFromDocFunction · 0.85

Calls 1

jsonPointerToArrayFunction · 0.85

Tested by

no test coverage detected