MCPcopy
hub / github.com/twitter/labella.js / getPathToRoot

Method getPathToRoot

src/core/node.js:82–90  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

80 }
81
82 getPathToRoot(){
83 const path = [];
84 let current = this;
85 while(current){
86 path.push(current);
87 current = current.parent;
88 }
89 return path;
90 }
91
92 getPathFromRoot(){
93 return this.getPathToRoot().reverse();

Callers 4

getPathFromRootMethod · 0.95
node.spec.jsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected