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

Function parseToJson

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

Source from the content-addressed store, hash-verified

37952 return { type: fo, payload: s }
37953 }
37954 const parseToJson =
37955 (s) =>
37956 ({ specActions: o, specSelectors: i, errActions: a }) => {
37957 let { specStr: u } = i,
37958 _ = null
37959 try {
37960 ;((s = s || u()), a.clear({ source: 'parser' }), (_ = fn.load(s, { schema: rn })))
37961 } catch (s) {
37962 return (
37963 console.error(s),
37964 a.newSpecErr({
37965 source: 'parser',
37966 level: 'error',
37967 message: s.reason,
37968 line: s.mark && s.mark.line ? s.mark.line + 1 : void 0,
37969 })
37970 )
37971 }
37972 return _ && 'object' == typeof _ ? o.updateJsonSpec(_) : o.updateJsonSpec({})
37973 }
37974 let jo = !1
37975 const resolveSpec =

Callers

nothing calls this directly

Calls 3

errorMethod · 0.80
uFunction · 0.70
loadMethod · 0.45

Tested by

no test coverage detected