File size: 233 Bytes
f909d7c
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
import { Graph } from "../json/jsonParser";

export const addEdgeToGraph = (graph: Graph, from: string, to: string) => {
  const newEdge = {
    id: `e${from}-${to}`,
    from: from,
    to: to,
  };

  graph.edges.push(newEdge);
};