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

Function getRetainingNodes

test/common/heap.js:339–350  ·  view source on GitHub ↗
(startingNode, filter)

Source from the content-addressed store, hash-verified

337}
338
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}
351
352module.exports = {
353 recordState,

Callers 1

Calls 1

listNodesFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…