MCPcopy Create free account
hub / github.com/idank/explainshell / revalue

Function revalue

explainshell/web/static/js/d3.v3.js:5425–5435  ·  view source on GitHub ↗
(node, depth)

Source from the content-addressed store, hash-verified

5423 return node;
5424 }
5425 function revalue(node, depth) {
5426 var children = node.children, v = 0;
5427 if (children && (n = children.length)) {
5428 var i = -1, n, j = depth + 1;
5429 while (++i < n) v += revalue(children[i], j);
5430 } else if (value) {
5431 v = +value.call(hierarchy, node, depth) || 0;
5432 }
5433 if (value) node.value = v;
5434 return v;
5435 }
5436 function hierarchy(d) {
5437 var nodes = [];
5438 recurse(d, 0, nodes);

Callers 1

d3.v3.jsFile · 0.85

Calls 1

callMethod · 0.45

Tested by

no test coverage detected