MCPcopy Create free account
hub / github.com/graphology/graphology

github.com/graphology/graphology @0.26.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release 0.26.0 ↗ · + Follow

A robust & multipurpose Graph object for JavaScript & TypeScript.

714 symbols 2,007 edges 464 files ⚖ MIT 204 documented · 29% 15 cross-repo links ● updated 3d agolatest release 0.26.0 · 2025-02-08★ 1,77880 open issues

Browse by type

⨍ Functions 607◇ Types & classes 107
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Build Status DOI

Graphology

graphology is a robust & multipurpose Graph object for JavaScript and TypeScript.

It aims at supporting various kinds of graphs with the same unified interface.

A graphology graph can therefore be directed, undirected or mixed, allow self-loops or not, and can be simple or support parallel edges.

Along with this Graph object, one will also find a comprehensive standard library full of graph theory algorithms and common utilities such as graph generators, layouts, traversals etc.

Finally, graphology graphs are able to emit a wide variety of events, which makes them ideal to build interactive renderers for the browser. It is for instance used by sigma.js as its data backend.

Installation

To install graphology using npm, run the following command:

npm install graphology

Legacy bundle

Standalone builds of graphology and its full standard library can be found in the repository's releases if you can only rely on your own script tags to load code.


<script src="https://github.com/graphology/graphology/raw/0.26.0/graphology.min.js"></script>

<script>
  const graph = new graphology.Graph();

  const {UndirectedGraph, DirectedGraph} = graphology;
</script>


<script src="https://github.com/graphology/graphology/raw/0.26.0/graphology-library.min.js"></script>

<script>
  const density = graphologyLibrary.metrics.graph.density(graph);
</script>

Be warned that the standard library bundle often lags behind and is not always completely up to date.

TypeScript usage

Note that graphology also exports type declaration that are installed along using peer dependencies so it can be used with TypeScript out of the box.

If your version of npm is a bit old, you may need to install graphology-types yourself if the peer dependency resolution is not made for you already:

npm install graphology-types

It can also be useful to pin graphology-types version in your package.json to avoid resolution issues sometimes.

How to cite

graphology is published on Zenodo as DOI

You can cite it thusly:

Guillaume Plique. (2021). Graphology, a robust and multipurpose Graph object for JavaScript. Zenodo. https://doi.org/10.5281/zenodo.5681257

Changelog

A complete changelog can be found here.

Core symbols most depended-on inside this repo

browse all functions →

Shape

Function 477
Method 130
Class 73
Interface 34

Languages

TypeScript100%

Modules by API surface

src/graphology/src/graph.js89 symbols
src/graphology/src/iteration/edges.js22 symbols
src/layout/circlepack.js18 symbols
src/graphology/src/endpoint.esm.d.ts18 symbols
src/graphology/src/index.js16 symbols
src/graphology/src/classes.js16 symbols
src/gexf/common/writer.js14 symbols
src/graphology/src/utils.js13 symbols
src/graphology/src/iteration/neighbors.js13 symbols
src/metrics/graph/modularity.js12 symbols
src/graphology/src/errors.js12 symbols
src/minivan/index.js11 symbols

For agents

$ claude mcp add --transport http codehub https://codehub.bot/mcp

One hosted endpoint, no key: your agent can search, read and trace graphology/graphology and every other graph here. Cursor, Windsurf and other clients →

⬇ download graph artifact

Ask about this repo answers extend the page