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

Function flattenCodeTree

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

Source from the content-addressed store, hash-verified

57743 { type: 'element', tagName: 'span', properties: U, children: o }
57744 )
57745 }
57746 function flattenCodeTree(s) {
57747 var o = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : [],
57748 i = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : []
57749 void 0 === s.length && (s = [s])
57750 for (var a = 0; a < s.length; a++) {
57751 var u = s[a]
57752 if ('text' === u.type)
57753 i.push(
57754 createLineElement({
57755 children: [u],
57756 className: toConsumableArray_toConsumableArray(new Set(o)),
57757 })
57758 )
57759 else if (u.children) {
57760 var _,
57761 w = o.concat(
57762 (null === (_ = u.properties) || void 0 === _ ? void 0 : _.className) || []
57763 )
57764 flattenCodeTree(u.children, w).forEach(function (s) {
57765 return i.push(s)
57766 })
57767 }
57768 }
57769 return i
57770 }
57771 function processLines(s, o, i, a, u, _, w, x, C) {
57772 var j,

Callers 1

processLinesFunction · 0.85

Calls 5

createLineElementFunction · 0.85
concatMethod · 0.80
pushMethod · 0.45
forEachMethod · 0.45

Tested by

no test coverage detected