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

Function listNodes

test/common/heap.js:341–347  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

339function getRetainingNodes(startingNode, filter) {
340 const seen = new Set();
341 function listNodes(node) {
342 if (!filter(node) || seen.has(node)) return;
343 seen.add(node);
344 for (const edge of node.incomingEdges) {
345 listNodes(edge.from);
346 }
347 }
348 listNodes(startingNode);
349 return [...seen];
350}

Callers 1

getRetainingNodesFunction · 0.85

Calls 3

hasMethod · 0.65
addMethod · 0.65
filterFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…