# dagrejs/graphlib

A directed multi-graph library for JavaScript

Repository: https://github.com/dagrejs/graphlib
Canonical: https://ross.abutalabs.com/products/graphlib
Language: TypeScript
License: MIT
License Family: permissive
Last push: 2026-08-03T19:38:24+00:00

## Health v2 (maintenance only)
Score: 66/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 95, release rhythm 8, longevity 100
- inputs: {"age_days": 4757, "days_push": 30, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1742, forks 248 (observed 2026-08-28T04:05:30.313884+00:00)

## What it is
Graphlib is a JavaScript/TypeScript library providing data structures for directed and undirected multi-graphs along with common graph algorithms. It is the graph data-structure library underlying the Dagre diagram-layout project.

## Use cases
- model directed and undirected graphs in JavaScript
- build a dependency graph of tasks or modules
- run graph algorithms like shortest path or topological sort
- represent a multigraph with parallel edges
- serialize and deserialize graph structures as JSON
- back a flowchart or DAG layout tool with graph data

## When to choose
- you need a lightweight, dependency-free graph data structure in JS/TS
- you are building on top of Dagre or need compatibility with its ecosystem
- you want basic graph algorithms without pulling in a heavy library like graphology or Cytoscape

## When to avoid
- you need advanced graph algorithms, centrality measures, or community detection
- you need graph visualization or rendering (use Cytoscape.js or D3 instead)
- you need high-performance graph processing on very large graphs

## Facets
- artifact type: library
- maturity: stable
- function: developer-tools
- domain: developer-tools
- platform: browser
- tags: graph-data-structures, directed-graph, multigraph, graph-algorithms, typescript, algorithms, nodejs, javascript

## Member repositories
- dagrejs/graphlib (main) score 66

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:30.313884+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:29:55.097382+00:00, confidence not recorded.
  - readme: https://github.com/dagrejs/graphlib (fetched 2026-08-28T04:05:30.313884+00:00, sha 6494a7d8c352)
  - registry_npm: https://registry.npmjs.org/graphlib (fetched 2026-08-29T11:07:36.003105+00:00, sha 7fcf2fcccc1f)
- Data as of 2026-08-30T08:39:29.467469+00:00.
