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

Function node_iterator

external/.d3.js:13151–13164  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

13149}
13150
13151function* node_iterator() {
13152 var node = this, current, next = [node], children, i, n;
13153 do {
13154 current = next.reverse(), next = [];
13155 while (node = current.pop()) {
13156 yield node;
13157 if (children = node.children) {
13158 for (i = 0, n = children.length; i < n; ++i) {
13159 next.push(children[i]);
13160 }
13161 }
13162 }
13163 } while (next.length);
13164}
13165
13166function hierarchy(data, children) {
13167 if (data instanceof Map) {

Callers

nothing calls this directly

Calls 1

reverseMethod · 0.80

Tested by

no test coverage detected