0.1.8 • Published 1 year ago

@devneko/graph-ts v0.1.8

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

graph-ts

in-memory graph database written in typescript.

Features

  • Basic graph structure inspired by Gremlin.
  • Gremlin like graph traversal.
  • Topological Sort
  • Decomposition of SCC

Example

const g: Graph = new Graph();
const v1 = g.addVertex('people', {
  name: 'Bob',
});
const v2 = g.addVertex('people', {
  name: 'Alice',
});
const v3 = g.addVertex('item', {
  name: 'Pencil',
});
g.addEdge('knows', v1, v2);
g.addEdge('has', v1, v3);

// returns vertices that have 'people' label.
g.V().hasLabel('people').toArray();
// returns the item that Bob has.
g.V(v1).out('has').toArray();
0.1.8

1 year ago

0.1.7

1 year ago

0.1.6

1 year ago

0.1.5

1 year ago

0.1.4

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago