@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.

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

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
Details
npm
2026-02-24 13:49:31 +00:00
1
BSD-3-Clause
latest
3.3 KiB
Assets (1)
topo-3.1.6.tgz 3.3 KiB
Versions (1) View all
3.1.6 2026-02-24