# topo

> Topological sorting with grouping support

Latest version **3.0.3** (published 2018-11-03) · BSD-3-Clause license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install topo
pnpm add topo
yarn add topo
bun add topo
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 3.0.3 |
| Published | 2018-11-03 |
| First published | 2014-04-13 |
| Weekly downloads | 0 |
| License | BSD-3-Clause |
| TypeScript types | separate (@types/topo) |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 9 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 109 |
| Maintainers | devinivy, hueniverse, marsup, nlf, wyatt |
| Keywords | topological, sort, toposort, topsort |

## Links

- npm: https://www.npmjs.com/package/topo
- Repository: https://github.com/hapijs/topo
- Homepage: https://github.com/hapijs/topo#readme
- Issues: https://github.com/hapijs/topo/issues
- npm.io page: https://npm.io/package/topo

## Dependencies (1)

- [hoek](https://npm.io/package/hoek.md) 6.x.x

## Alternatives

- [cli-color](https://npm.io/package/cli-color.md) — 3.4M weekly downloads
- [log](https://npm.io/package/log.md) — 1.3M weekly downloads
- [logstash-client](https://npm.io/package/logstash-client.md) — 4.5K weekly downloads
- [@nocobase/plugin-logger](https://npm.io/package/@nocobase/plugin-logger.md) — 2.0K weekly downloads
- [child-process-debug](https://npm.io/package/child-process-debug.md) — 695 weekly downloads

## Recent versions

- 3.0.3 (latest) — 2018-11-03
- 2.1.1 (v2-legacy) — 2024-01-01
- 3.0.2 — 2018-11-01
- 3.0.1 — 2018-10-31
- 3.0.0 — 2017-09-26
- 2.0.2 — 2016-07-17
- 2.0.1 — 2016-05-19
- 2.0.0 — 2015-11-01
- 1.1.0 — 2015-10-05
- 1.0.3 — 2015-07-29
- 1.0.2 — 2014-10-06
- 1.0.1 — 2014-08-03
- 1.0.0 — 2014-04-13

## README

# topo

Topological sorting with grouping support.

[![Build Status](https://secure.travis-ci.org/hapijs/topo.svg?branch=master)](http://travis-ci.org/hapijs/topo)

Lead Maintainer: [Devin Ivy](https://github.com/devinivy)

## Usage

See the [API Reference](API.md)

**Example**
```js
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']
```

---
_Source: https://npm.io/package/topo · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
