MCPcopy Index your code
hub / github.com/nodejs/node / traverse_

Method traverse_

deps/v8/tools/splaytree.mjs:260–269  ·  view source on GitHub ↗

* Performs a preorder traversal of the tree. * * @param {function(SplayTreeNode)} f Visitor function. * @private

(f)

Source from the content-addressed store, hash-verified

258 * @private
259 */
260 traverse_(f) {
261 const nodesToVisit = [this.root_];
262 while (nodesToVisit.length > 0) {
263 const node = nodesToVisit.shift();
264 if (node === null) continue;
265 f(node);
266 nodesToVisit.push(node.left);
267 nodesToVisit.push(node.right);
268 }
269 }
270}
271
272/**

Callers 2

exportKeysAndValuesMethod · 0.95
exportValuesMethod · 0.95

Calls 3

fFunction · 0.50
shiftMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected