MCPcopy Create free account
hub / github.com/BloombergGraphics/whatiscode / collapse

Function collapse

modules/tree/tree.js:68–74  ·  view source on GitHub ↗
(d)

Source from the content-addressed store, hash-verified

66 }
67
68 function collapse(d) {
69 if (d.children) {
70 d._children = d.children;
71 d._children.forEach(collapse);
72 d.children = null;
73 }
74 }
75
76 function findMaxDepth(nodes) {
77 return _.max(nodes.map(function(node, index) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected