A simple JavaScript implementation of Dijkstra's single-source shortest-paths algorithm.