MCPcopy Index your code
hub / github.com/prettier/prettier / getNode

Method getNode

src/common/ast-path.js:102–105  ·  view source on GitHub ↗
(count = 0)

Source from the content-addressed store, hash-verified

100 }
101
102 getNode(count = 0) {
103 const stackIndex = this.#getNodeStackIndex(count);
104 return stackIndex === -1 ? null : this.stack[stackIndex];
105 }
106
107 getParentNode(count = 0) {
108 return this.getNode(count + 1);

Callers 5

parentMethod · 0.95
grandparentMethod · 0.95
getParentNodeMethod · 0.95
edge_case.jsFile · 0.80
edge_case.tsFile · 0.80

Calls 1

#getNodeStackIndexMethod · 0.95

Tested by

no test coverage detected