package
Topological sorting with grouping support
npm install topoGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
Estimated unpacked size across 2 packages.
39.3 kB
Includes dependencies.
marsup
nicolas@morel.io
Topological sorting with grouping support.
Lead Maintainer: Devin Ivy
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']