# topo-sort

> Simple and fast implementation of topological sorting. No dependencies. A circular graph will throw an error with circular nodes info.

Latest version **1.0.0** (published 2014-10-21) · MIT license · 0 weekly downloads

## Install

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

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2014-10-21 |
| First published | 2014-10-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | liy |
| Maintainers | liy |
| Keywords | graph, sort, topological, dependency |

## Links

- npm: https://www.npmjs.com/package/topo-sort
- Repository: https://github.com/liy/topo-sort
- Issues: https://github.com/liy/topo-sort/issues
- npm.io page: https://npm.io/package/topo-sort

## Alternatives

- [apollo-link-http-common](https://npm.io/package/apollo-link-http-common.md) — 879.0K weekly downloads
- [react-relay](https://npm.io/package/react-relay.md) — 336.8K weekly downloads
- [relay-test-utils](https://npm.io/package/relay-test-utils.md) — 181.6K weekly downloads
- [@vendure/core](https://npm.io/package/@vendure/core.md) — 14.8K weekly downloads
- [@pnpm/deps.graph-sequencer](https://npm.io/package/@pnpm/deps.graph-sequencer.md) — 13.4K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2014-10-21
- 0.5.1 — 2014-10-21
- 0.5.0 — 2014-10-21
- 0.4.1 — 2014-10-18
- 0.4.0 — 2014-10-18
- 0.3.0 — 2014-10-18
- 0.2.0 — 2014-10-18

## README

# Usage
Must not add any null, undefined or empty string node.
```javascript
var TopoSort = require('topo-sort');

var tsort = new TopoSort();
tsort.add('a', ['b', 'c']);
tsort.add('d', ['a', 'b', 'c']);
// Output d,a,c,b
var l = tsort.sort();
```

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