UNPKG

d3-hierarchy

Version:

Layout algorithms for visualizing hierarchical data.

8 lines (7 loc) 138 B
export default function() { var node = this, nodes = [node]; while (node = node.parent) { nodes.push(node); } return nodes; }