Detalhes do pacote

topo

hapijs2.7mBSD-3-Clausedepreciado3.0.3

This module has moved and is now available at @hapi/topo. Please update your dependencies as this version is no longer maintained an may contain bugs and security issues.

Topological sorting with grouping support

topological, sort, toposort, topsort

readme (leia-me)

topo

Topological sorting with grouping support.

Build Status

Lead Maintainer: Devin Ivy

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