A lightweight, in-memory graph data structure library for JavaScript with event-driven updates.
ngraph.graph is a JavaScript library that implements an in-memory graph data structure, allowing developers to create, manipulate, and traverse graphs with nodes and edges. It solves the need for a lightweight, efficient graph representation in JavaScript applications, such as network analysis, dependency mapping, or social graph modeling.
JavaScript developers working on applications that require graph-based data structures, such as network visualizations, pathfinding algorithms, or complex relationship modeling.
Developers choose ngraph.graph for its simplicity, event-driven architecture, and seamless integration with the broader ngraph ecosystem, offering a performant and flexible solution without heavy dependencies.
Graph data structure in JavaScript
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Allows associating arbitrary JavaScript objects with nodes and links, enabling custom metadata storage as shown in the README with examples like server status data.
Provides event listeners for graph changes, supporting reactive programming patterns and bulk updates via beginUpdate()/endUpdate() to optimize performance.
Offers dedicated methods like forEachNode(), forEachLink(), and forEachLinkedNode() for easy and efficient enumeration of graph elements without manual iteration.
Designed with simplicity in mind, it has no unnecessary dependencies, making it lightweight and easy to integrate into various JavaScript projects.
Lacks core graph algorithms such as shortest path or connectivity checks; users must rely on separate ngraph packages or implement their own, adding complexity.
Does not provide persistence mechanisms; all graph data is stored in memory and lost on application restart, requiring custom solutions for data saving and loading.
Basic API can lead to verbose code for tasks like removing links, which requires iterating with forEachLinkedNode() instead of direct methods, as noted in the README examples.