Skip to content

Conversation

tintinthong
Copy link
Contributor

#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())

@jriecken
Copy link
Owner

jriecken commented Apr 9, 2020

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

@throrin19
Copy link

any news about this useful feature ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants