Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
14 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Deppy - A simple dependency graph resolver. | ||
|
||
Deppy is a JavaScript library for resolving dependency graphs. It handles cycles and multiple independent nodes. Nodes can be defined in any order. | ||
|
||
# Serial resolution of dependencies | ||
|
||
Deppy will walk the graph and build an array of nodes. The first element in the array has no dependencies while subsequent elements depend on zero or more previous elements. Here is an example of using deppy to build and resolve a graph: | ||
|
||
var d = require('deppy').create(); | ||
d('a'); | ||
d('c', ['b']); | ||
d('b', ['a']); | ||
console.log(d.resolve('c')); // [ 'a', 'b', 'c' ] | ||
|