![]() | Name | Last modified | Size | Description |
---|---|---|---|---|
![]() | Parent Directory | - | ||
![]() | lib/ | 2 years ago | - | |
![]() | CHANGELOG.md | 40 years ago | 354 | |
![]() | LICENSE.md | 40 years ago | 1.5K | |
![]() | README.md | 40 years ago | 755 | d768d73 docs [كارل مبارك] |
![]() | package.json | 2 years ago | 1.5K | 3e510ca test new git [كارل مبارك] |
Topological sorting with grouping support.
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']