source: node_modules/d3-hierarchy/src/hierarchy/eachBefore.js@ ba17441

Last change on this file since ba17441 was e4c61dd, checked in by istevanoska <ilinastevanoska@…>, 6 months ago

Prototype 1.1

  • Property mode set to 100644
File size: 334 bytes
RevLine 
[e4c61dd]1export default function(callback, that) {
2 var node = this, nodes = [node], children, i, index = -1;
3 while (node = nodes.pop()) {
4 callback.call(that, node, ++index, this);
5 if (children = node.children) {
6 for (i = children.length - 1; i >= 0; --i) {
7 nodes.push(children[i]);
8 }
9 }
10 }
11 return this;
12}
Note: See TracBrowser for help on using the repository browser.