3.0.3 • Published 3 months ago

topo v3.0.3

Weekly downloads
1,438,329
License
BSD-3-Clause
Repository
github
Last release
3 months ago

topo

Topological sorting with grouping support.

Build Status

License

This version of the package requires a commercial license. You may not use, copy, or distribute it without first acquiring a commercial license from Sideway Inc. Using this software without a license is a violation of US and international law. To obtain a license, please contact sales@sideway.com. The open source version of this package can be found here.

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']