MCPcopy Create free account
hub / github.com/Hashnode/starter-kit / _walk

Method _walk

packages/utils/renderer/highlight.js:172–180  ·  view source on GitHub ↗
(e, n)

Source from the content-addressed store, hash-verified

170 return this.constructor._walk(e, this.rootNode);
171 }
172 static _walk(e, n) {
173 return (
174 'string' == typeof n
175 ? e.addText(n)
176 : n.children &&
177 (e.openNode(n), n.children.forEach((n) => this._walk(e, n)), e.closeNode(n)),
178 e
179 );
180 }
181 static _collapse(e) {
182 'string' != typeof e &&
183 e.children &&

Callers 1

walkMethod · 0.80

Calls 3

addTextMethod · 0.45
openNodeMethod · 0.45
closeNodeMethod · 0.45

Tested by

no test coverage detected