trailduck
v0.2.2
Published
a topological cyclic sorting algorithm based on depth-first search (dfs)
Downloads
15
Maintainers
Readme
trailduck
a topological cyclic sorting algorithm based on depth-first search (dfs)
Please ★ this repo if you found it useful ★ ★ ★
Features
- works with cycles in the graph
- detects overlapping cycles
- loosly based on depth-first search (dfs)
Installation
npm install --save trailduck
Dependencies
Usage
const trailDuck = new TrailDuck({
A: {
children: ['B', 'D', 'E']
},
B: { children: ['C'] },
C: { children: ['A'] },
D: { children: ['E'] },
E: { children: ['A'] }
});
console.log('cycles', trailDuck.cycles);
console.log('ordered', trailDuck.ordered);
console.log('tree', trailDuck.tree);
Support
Submit an issue
Screenshots
Contribute a screenshot
Contributing
Review the guidelines for contributing
License
Jam Risser © 2018
Changelog
Review the changelog
Credits
- Jam Risser - Author
Support on Liberapay
A ridiculous amount of coffee ☕ ☕ ☕ was consumed in the process of building this project.
Add some fuel if you'd like to keep me going!