MCPcopy Create free account
hub / github.com/idank/explainshell / closeAllNodes

Method closeAllNodes

explainshell/web/static/js/highlight.min.js:32–33  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

30 this.top.children.push(e)}openNode(e){const t=r({scope:e})
31 ;this.add(t),this.stack.push(t)}closeNode(){
32 if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){
33 for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}
34 walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){
35 return"string"==typeof t?e.addText(t):t.children&&(e.openNode(t),
36 t.children.forEach((t=>this._walk(e,t))),e.closeNode(t)),e}static _collapse(e){

Callers 1

finalizeMethod · 0.80

Calls 1

closeNodeMethod · 0.95

Tested by

no test coverage detected