| Current Path : /home/emeraadmin/public_html/node_modules/d3-hierarchy/src/hierarchy/ |
| Current File : /home/emeraadmin/public_html/node_modules/d3-hierarchy/src/hierarchy/each.js |
export default function(callback) {
var node = this, current, next = [node], children, i, n;
do {
current = next.reverse(), next = [];
while (node = current.pop()) {
callback(node), children = node.children;
if (children) for (i = 0, n = children.length; i < n; ++i) {
next.push(children[i]);
}
}
} while (next.length);
return this;
}