Encapsule/jsgraph is a framework for working with directed graph data models using an in-memory storage container abstraction, and a small but growing collection of powerfully-extensible graph coloring algorithms implemented using the visitor pattern. The library is specifically designed for efficient embedding in complex Node.js / HTML 5 applications that require clean separation of concerns, and a high-degree of extensibility and control.
jsgraph is based on the API design and architectural separaton of concerns for graph algorithms invented by the authors of the Boost C++ Graph Library (BGL). The port is logically close enough that the BGL documentation should be considered as an advanced resource.