MCPcopy Create free account
hub / github.com/breck7/scroll / node_eachBefore

Function node_eachBefore

external/.d3.js:13032–13043  ·  view source on GitHub ↗
(callback, that)

Source from the content-addressed store, hash-verified

13030}
13031
13032function node_eachBefore(callback, that) {
13033 var node = this, nodes = [node], children, i, index = -1;
13034 while (node = nodes.pop()) {
13035 callback.call(that, node, ++index, this);
13036 if (children = node.children) {
13037 for (i = children.length - 1; i >= 0; --i) {
13038 nodes.push(children[i]);
13039 }
13040 }
13041 }
13042 return this;
13043}
13044
13045function node_eachAfter(callback, that) {
13046 var node = this, nodes = [node], next = [], children, i, n, index = -1;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected