anvaka / npmgraph.an

2d visualization of npm
https://npm.anvaka.com
MIT License
1.23k stars 83 forks source link

Feature request: More easily find the leaf nodes #17

Open SgtPooki opened 7 years ago

SgtPooki commented 7 years ago

For those of us concerned about our dependency graphs, it would be really useful to be able to more easily find the leaf nodes, or to filter nodes in the graph by their depth.

gg4u commented 7 years ago

could you use native functions graph.foreachNode or graph.foreachLinkedNode ?

Or

var degree = calculator.degreeCentrality(graph); degree.forEach( function (node) { console.log( node.value)  })