stores a graph of nodes and provides sorting and iteration
Stores a graph of nodes and provides topological sorting. Basically just an OO API for toposort so you can build your graph incrementally.
$ packin add jkroso/graph
then in your app:
var graph = require'graph'
node if not already in the graph
add two nodes with a relationship
add a relationship between two existing nodes
convert to a topologically sorted array
clone this Graph
'c' 'a' 'd' 'b'addRelationship'a' 'b'addRelationship'b' 'c'addRelationship'c' 'd'toArray // => ['a', 'b', 'c', 'd']
make and navigate your browser to the test directory.