@hapi/topo (3.1.6)
Published 2026-02-24 13:49:31 +00:00 by atheaadmin
Installation
@hapi:registry=npm install @hapi/topo@3.1.6"@hapi/topo": "3.1.6"About this package
@hapi/topo
Topological sorting with grouping support.
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']
Dependencies
Dependencies
| ID | Version |
|---|---|
| @hapi/hoek | ^8.3.0 |
Development Dependencies
| ID | Version |
|---|---|
| @hapi/code | 6.x.x |
| @hapi/lab | 20.x.x |
Keywords
topological
sort
toposort
topsort
