javascript library for a weighted graph data structure