node-dijkstra symbols, one at a time
const Graph = require('node-dijkstra');
const A = Symbol('A');
const B = Symbol('B');
const C = Symbol('C');
const route = new Graph();
const a = new Map();
a.set(B, 1);
a.set(C, 2);
route.addNode(A, a);
const b = new Map();
b.set(A, 2);
route.addNode(B, b);
route.path(A, B);
no comments