topo-sort

Simple and fast implementation of topological sorting. No dependencies. A circular graph will throw an error with circular nodes info.

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
topo-sort
501.0.08 years ago8 years agoMinified + gzip package size for topo-sort in KB

Readme

Usage
Must not add any null, undefined or empty string node. ```javascript var TopoSort = require('topo-sort'); var tsort = new TopoSort(); tsort.add('a', 'b', 'c'); tsort.add('d', 'a', 'b', 'c'); // Output d,a,c,b var l = tsort.sort(); ```