dependency-graph icon indicating copy to clipboard operation
dependency-graph copied to clipboard

Feat/level of dependency for #27

Open tintinthong opened this issue 4 years ago • 2 comments

#27

var { DepGraph } = require("./lib/dep_graph");

var tree = new DepGraph();

tree.addNode('a');
tree.addNode('b');
tree.addNode('c');
tree.addNode('d');
tree.addNode('e');
tree.addNode('f');
tree.addNode('g');
tree.addDependency('a', 'b');
tree.addDependency('a', 'c'); 
tree.addDependency('c', 'd');
tree.addDependency('d', 'e');
tree.addDependency('d', 'f');
tree.addDependency('d', 'g');
console.log(tree)
console.log(tree.getNodesEachLevel())

tintinthong avatar Apr 03 '20 19:04 tintinthong

Thanks for the PR! Would it be possible to add some tests?

jriecken avatar Apr 09 '20 18:04 jriecken

any news about this useful feature ?

throrin19 avatar Apr 25 '24 13:04 throrin19