7.0.0 • Published 2 years ago

ngraph.fromdot v7.0.0

Weekly downloads
30
License
MIT
Repository
github
Last release
2 years ago

ngraph.fromdot Build Status

Load dot files into ngraph.graph

usage

You can get the library from CDN:

<script src='https://cdn.jsdelivr.net/npm/ngraph.fromdot/dist/ngraph.fromDot.js'></script>

Or from npm:

npm install ngraph.fromdot

and then:

var fromDot = require('ngraph.fromdot');

After the library is loaded, it is straightforward to use:

// you can load empty graph:
var emptyGraph = fromDot('digraph G {}');

// or graph with edges only:
var twoEdgesGraph = fromDot('digraph G { a -> b }');

// above graph is the same as
var sameAsAbove = fromDot('digraph G { a; b; a -> b }');

// you can also "append" to existing graph if you wish so:
fromDot('digraph B { a -> b }', emptyGraph);

// now emptyGraph is no longer empty:
emptyGraph.getLinksCount(); // returns 1
emptyGraph.getNodesCount(); // returns 2

license

MIT

7.0.0

2 years ago

6.0.1

4 years ago

6.0.0

4 years ago

5.0.1

4 years ago

5.0.0

5 years ago

0.4.0

5 years ago

0.3.0

5 years ago

0.2.0

7 years ago

0.1.6

9 years ago

0.1.5

9 years ago

0.1.4

9 years ago

0.1.3

9 years ago

0.1.2

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago