index.js
function load(dotGraph, appendTo) {
  var dotAST = parseDot(dotGraph);
  if (dotAST.length > 1 && appendTo !== undefined) {
    throw new Error('Dot file contains multiple graphs. Cannot use `saveTo` in this case');
  }

  if (!appendTo) {
    appendTo = require('ngraph.graph')();
  }
  // by default load will only load first graph:

  return loadOne(appendTo, dotAST[0]);
}
function load(dotGraph, appendTo) {
  var dotAST = parseDot(dotGraph);
  if (dotAST.length > 1 && appendTo !== undefined) {
    throw new Error('Dot file contains multiple graphs. Cannot use `saveTo` in this case');
  }

  if (!appendTo) {
    appendTo = require('ngraph.graph')();
  }
  // by default load will only load first graph:

  return loadOne(appendTo, dotAST[0]);
}
Loads graph from 'dot' string.

@param {String} dotGraph a graph in `dot` format
@param {ngraph.graph=} appendTo optional argument if you want to append parsed
graph to an old graph.

@return {ngraph.graph} Parsed graph

@see https://en.wikipedia.org/wiki/DOT_(graph_description_language)
@see https://github.com/anvaka/ngraph.graph