Closed juhoha closed 9 years ago
… non-existent var edges
For example:
var deps = new (require('dependency-graph').DepGraph)(); deps.addNode('a'); deps.addNode('b'); deps.addNode('c'); deps.addDependency('a', 'b'); deps.addDependency('b', 'c'); console.log(deps); deps.removeNode('c'); console.log(deps);
{ nodes: { a: 'a', b: 'b', c: 'c' }, outgoingEdges: { a: [ 'b' ], b: [ 'c' ], c: [] }, incomingEdges: { a: [], b: [ 'a' ], c: [ 'b' ] } } { nodes: { a: 'a', b: 'b' }, outgoingEdges: { a: [ 'b' ], b: [ 'c' ] }, incomingEdges: { a: [], b: [ 'a' ] } }
Thanks!
I've released version 0.2.1.
0.2.1
… non-existent var edges
For example:
var deps = new (require('dependency-graph').DepGraph)(); deps.addNode('a'); deps.addNode('b'); deps.addNode('c'); deps.addDependency('a', 'b'); deps.addDependency('b', 'c'); console.log(deps); deps.removeNode('c'); console.log(deps);
{ nodes: { a: 'a', b: 'b', c: 'c' }, outgoingEdges: { a: [ 'b' ], b: [ 'c' ], c: [] }, incomingEdges: { a: [], b: [ 'a' ], c: [ 'b' ] } } { nodes: { a: 'a', b: 'b' }, outgoingEdges: { a: [ 'b' ], b: [ 'c' ] }, incomingEdges: { a: [], b: [ 'a' ] } }