Skip to content

Commit

Permalink
better comments
Browse files Browse the repository at this point in the history
  • Loading branch information
anvaka committed Nov 12, 2023
1 parent bdf04fb commit e90061f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ function load(dotGraph, appendTo) {
if (!appendTo) {
appendTo = require('ngraph.graph')();
}
// by default load will only load first graph:

// by default load will only load the first graph:
return loadOne(appendTo, dotAST[0]);
}

Expand Down Expand Up @@ -56,7 +56,7 @@ function loadSubgraph(graph, ast) {

function processEdgeStatement(graph, edgeAST) {
var edges = edgeAST.edge_list;
if (edges.length === 0) return; // wat?
if (edges.length === 0) return; // wat? should I throw?

var first = edges[0];
var addedNodes = [];
Expand Down Expand Up @@ -125,4 +125,5 @@ function parseAttributesAsData(attributesList) {
function mergeNodeDataIfNeeded(newData, oldNode) {
if (!oldNode || !oldNode.data) return newData;
return Object.assign(oldNode.data, newData);
}
}

0 comments on commit e90061f

Please sign in to comment.