UNPKG

d3-dag

Version:

Layout algorithms for visualizing directed acylic graphs.

9 lines (8 loc) 253 B
// Call function on each node such that a node is called before any of its parents export default function(func) { // TODO Better way to do this? const all = []; this.eachBefore((n) => all.push(n)); all.reverse().forEach(func); return this; }