Socket
Socket
Sign inDemoInstall

ngraph.fromdot

Package Overview
Dependencies
3
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    ngraph.fromdot

Load dot files into ngraph.graph


Version published
Maintainers
1
Install size
626 kB
Created

Readme

Source

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

Keywords

FAQs

Last updated on 03 Jan 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc