Topological sorting with grouping support
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib More idiomatic ES6 usage Aug 6, 2018
test Update to lab v15. Closes #29 Oct 29, 2017
.gitignore node 9 Nov 3, 2017
.npmignore
.travis.yml Update implementation to use classes. Update license and travis. Aug 3, 2018
API.md
CONTRIBUTING.md Update CONTRIBUTING.md Dec 9, 2014
LICENSE Update implementation to use classes. Update license and travis. Aug 3, 2018
README.md Update implementation to use classes. Update license and travis. Aug 3, 2018
package.json node 9 Nov 3, 2017

README.md

topo

Topological sorting with grouping support.

Build Status

Lead Maintainer: Devin Ivy

Usage

See the API Reference

Example

const Topo = require('topo');

const morning = new Topo();

morning.add('Nap', { after: ['breakfast', 'prep'] });

morning.add([
    'Make toast',
    'Pour juice'
], { before: 'breakfast', group: 'prep' });

morning.add('Eat breakfast', { group: 'breakfast' });

morning.nodes;        // ['Make toast', 'Pour juice', 'Eat breakfast', 'Nap']