1
0
Fork 0
management/front/dkha-web-sz-main/node_modules/@hapi/topo
zhurui 54669c07cf i4 2023-12-18 13:12:25 +08:00
..
lib i4 2023-12-18 13:12:25 +08:00
CHANGELOG.md i4 2023-12-18 13:12:25 +08:00
LICENSE.md i4 2023-12-18 13:12:25 +08:00
README.md i4 2023-12-18 13:12:25 +08:00
package.json i4 2023-12-18 13:12:25 +08:00

README.md

topo

Topological sorting with grouping support.

Build Status

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