# toposource

> Directed graphs analyzer for parallel traversals

Latest version **1.2.0** (published 2023-12-18) · MIT license · 0 weekly downloads

## Install

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

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; has provenance; high quality score.

Warnings: low downloads.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.2.0 |
| Published | 2023-12-18 |
| First published | 2023-02-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 22.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 7 |
| Maintainers | semrel-extra-bot |
| Keywords | topological, sort, sorting, graphs, graph, dependency, list, dependencies, directed, acyclic, dag |

## Links

- npm: https://www.npmjs.com/package/toposource
- Repository: https://github.com/semrel-extra/toposource
- Homepage: https://github.com/semrel-extra/toposource#readme
- Issues: https://github.com/semrel-extra/toposource/issues
- npm.io page: https://npm.io/package/toposource

## 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.2.0 (latest) — 2023-12-18
- 1.1.4 — 2023-04-26
- 1.1.3 — 2023-03-26
- 1.1.2 — 2023-02-28
- 1.1.1 — 2023-02-23
- 1.1.0 — 2023-02-23
- 1.0.3 — 2023-02-23
- 1.0.2 — 2023-02-23
- 1.0.1 — 2023-02-23
- 1.0.0 — 2023-02-20

## README

# toposource
[![CI](https://github.com/semrel-extra/toposource/actions/workflows/ci.yaml/badge.svg?branch=master&event=push)](https://github.com/semrel-extra/toposource/actions/workflows/ci.yaml)
[![Maintainability](https://api.codeclimate.com/v1/badges/41fea7047ed5521e2075/maintainability)](https://codeclimate.com/github/semrel-extra/toposource/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/41fea7047ed5521e2075/test_coverage)](https://codeclimate.com/github/semrel-extra/toposource/test_coverage)
> Directed graphs analyzer for parallel traversals

## Usage

```ts
import { analyze } from 'toposource'

analyze([['a', 'b'], ['b', 'c'], ['d', 'c'], ['e', 'f']])
// →
{
  next: new Map([
    ['a', ['b']],
    ['b', ['c']],
    ['d', ['c']],
    ['e', ['f']]
  ]),
  prev: new Map([
    ['b', ['a']],
    ['c', ['b', 'd']],
    ['f', ['e']]
  ]),
  sources: [ 'a', 'd', 'e' ],
  queue: ['a', 'd', 'e', 'b', 'c', 'f'],
  graphs: [{
    sources: ['a', 'd'],
    nodes: new Set(['a', 'b', 'd', 'c'])
  }, {
    sources: ['e'],
    nodes: new Set(['e', 'f'])
  },
}
```

## Alternatives
* [toposort](https://github.com/marcelklehr/toposort)
* [batching-toposort](https://github.com/glebec/batching-toposort)
* [js-graph-algorithms](https://github.com/chen0040/js-graph-algorithms)
* [topology-runner](https://github.com/smartprocure/topology-runner)
* [graph-data-structure](https://github.com/datavis-tech/graph-data-structure)

## License
[MIT](./LICENSE)

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