A simple dependency graph for Node.js
MIT License
Bot releases are hidden (Show)
Map
/Set
rather than using raw objects as pseudo-Maps/Sets. (Fixes #46)
Map
/Set
(which should be almost everything now in 2023).circular
property is cloned during clone - thanks andrew-healey and tintinthong!Published by jriecken almost 4 years ago
directDependenciesOf
and directDependantsOf
methods for retrieving direct dependency information. (Fixes #40)dependentsOf
and directDependentsOf
.Published by jriecken over 4 years ago
O(N^2)
(thanks willtennien for pointing this out!)Published by jriecken almost 5 years ago
overallOrder
when cycles are allowed. (Fixes #33)Published by jriecken about 6 years ago
Published by jriecken almost 7 years ago
size
method that will return the number of nodes in the graph.clone
method that will clone the graph. Any custom node data will only be shallow-copied. (Fixes #14)Published by jriecken almost 7 years ago
Published by jriecken over 8 years ago
Published by jriecken about 9 years ago
Published by jriecken about 9 years ago
Dependency Cycle Found: a -> b -> c -> a
(Fixes #7)addDependency
if one of the nodes does not exist, the error will say which one it was (instead of saying that "one" of the two nodes did not exist and making you manually determine which one)overallOrder
on an empty graph will no longer throw an error about a dependency cycle. It will return an empty array.Published by jriecken about 9 years ago
addNode
twice with the same name, it would clear all edges for that node. Now it will do nothing if a node with the specified name already exists. (Fixes #3)Published by jriecken over 9 years ago
Initial Release - extracted out of asset-smasher