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

Function mergeAll

frontend/public/swagger-ui-bundle.js:42238–42308  ·  view source on GitHub ↗
(
            s,
            {
              visitFnGetter: o = getVisitFn,
              nodeTypeGetter: i = getNodeType,
              breakSymbol: a = qu,
              deleteNodeSymbol: u = null,
              skipVisitingNodeSymbol: _ = !1,
              exposeEdits: w = !1,
            } = {}
          )

Source from the content-addressed store, hash-verified

42236 isNode = (s) => 'string' == typeof getNodeType(s),
42237 cloneNode = (s) =>
42238 Object.create(Object.getPrototypeOf(s), Object.getOwnPropertyDescriptors(s)),
42239 mergeAll = (
42240 s,
42241 {
42242 visitFnGetter: o = getVisitFn,
42243 nodeTypeGetter: i = getNodeType,
42244 breakSymbol: a = qu,
42245 deleteNodeSymbol: u = null,
42246 skipVisitingNodeSymbol: _ = !1,
42247 exposeEdits: w = !1,
42248 } = {}
42249 ) => {
42250 const x = Symbol('skip'),
42251 C = new Array(s.length).fill(x)
42252 return {
42253 enter(j, L, B, $, U, V) {
42254 let z = j,
42255 Y = !1
42256 const Z = {
42257 ...V,
42258 replaceWith(s, o) {
42259 ;(V.replaceWith(s, o), (z = s))
42260 },
42261 }
42262 for (let j = 0; j < s.length; j += 1)
42263 if (C[j] === x) {
42264 const x = o(s[j], i(z), !1)
42265 if ('function' == typeof x) {
42266 const o = x.call(s[j], z, L, B, $, U, Z)
42267 if ('function' == typeof (null == o ? void 0 : o.then))
42268 throw new Go('Async visitor not supported in sync mode', {
42269 visitor: s[j],
42270 visitFn: x,
42271 })
42272 if (o === _) C[j] = z
42273 else if (o === a) C[j] = a
42274 else {
42275 if (o === u) return o
42276 if (void 0 !== o) {
42277 if (!w) return o
42278 ;((z = o), (Y = !0))
42279 }
42280 }
42281 }
42282 }
42283 return Y ? z : void 0
42284 },
42285 leave(u, w, j, L, B, $) {
42286 let U = u
42287 const V = {
42288 ...$,
42289 replaceWith(s, o) {
42290 ;($.replaceWith(s, o), (U = s))
42291 },
42292 }
42293 for (let u = 0; u < s.length; u += 1)
42294 if (C[u] === x) {
42295 const x = o(s[u], i(U), !0)

Callers 1

dispatchPluginsSyncFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected