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

Function resolve

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

Source from the content-addressed store, hash-verified

7480 u = i(31499),
7481 _ = i(88310).Stream
7482 function resolve(s, o, i) {
7483 var a,
7484 _ = (function create_indent(s, o) {
7485 return new Array(o || 0).join(s || '')
7486 })(o, (i = i || 0)),
7487 w = s
7488 if ('object' == typeof s && (w = s[(a = Object.keys(s)[0])]) && w._elem)
7489 return (
7490 (w._elem.name = a),
7491 (w._elem.icount = i),
7492 (w._elem.indent = o),
7493 (w._elem.indents = _),
7494 (w._elem.interrupt = w),
7495 w._elem
7496 )
7497 var x,
7498 C = [],
7499 j = []
7500 function get_attributes(s) {
7501 Object.keys(s).forEach(function (o) {
7502 C.push(
7503 (function attribute(s, o) {
7504 return s + '="' + u(o) + '"'
7505 })(o, s[o])
7506 )
7507 })
7508 }
7509 switch (typeof w) {
7510 case 'object':
7511 if (null === w) break
7512 ;(w._attr && get_attributes(w._attr),
7513 w._cdata &&
7514 j.push(('<![CDATA[' + w._cdata).replace(/\]\]>/g, ']]]]><![CDATA[>') + ']]>'),
7515 w.forEach &&
7516 ((x = !1),
7517 j.push(''),
7518 w.forEach(function (s) {
7519 'object' == typeof s
7520 ? '_attr' == Object.keys(s)[0]
7521 ? get_attributes(s._attr)
7522 : j.push(resolve(s, o, i + 1))
7523 : (j.pop(), (x = !0), j.push(u(s)))
7524 }),
7525 x || j.push('')))
7526 break
7527 default:
7528 j.push(u(w))
7529 }
7530 return {
7531 name: a,
7532 interrupt: !1,
7533 attributes: C,
7534 content: j,
7535 icount: i,
7536 indents: _,
7537 indent: o,
7538 }
7539 }

Callers 15

addFunction · 0.85
absolutifyPointerFunction · 0.85
absoluteifyFunction · 0.85
resolveSchema$refFieldFunction · 0.85
uri_evaluateFunction · 0.85
toBaseURIMethod · 0.85
ReferenceElementMethod · 0.85
PathItemElementMethod · 0.85
ReferenceElementMethod · 0.85
PathItemElementMethod · 0.85
SchemaElementMethod · 0.85

Calls 7

get_attributesFunction · 0.85
replaceMethod · 0.80
uFunction · 0.70
keysMethod · 0.45
pushMethod · 0.45
forEachMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected