title: Javascript data structures library
body: <p>I'd like to ask for recommendation of JavaScript library/libraries that supply an implementation of some basic data structures such as a priority queue, map with arbitrary keys, tries, graphs, etc. along with some algorithms that operate on them.</p>
  
  <p>I'm mostly interested in: </p>
  
  <ul>
  <li>The set of features covered,</li>
  <li>Flexibility of the solution - this mostly applies to graphs. For example do I have to use a supplied graph implementation,</li>
  <li>Use of functional features of the language - again it sometimes gives greater flexibility,</li>
  <li>Performance of the implementation</li>
  </ul>
  
  <p>I'd like to point out that I'm aware that it's possible to implement using JavaScript the following data structures:</p>
  
  <ul>
  <li>A map, if key values are either strings or numbers,</li>
  <li>A set, (using a map implementation),</li>
  <li>A queue, although as was pointed out below, it's inefficient on some browsers,</li>
  </ul>
  
  <p>At the moment I'm mostly interested in priority queues (not to confuse with regular queues), graph implementations that aren't very intrusive as to the format of the input graph. For example they could use callbacks to traverse the structure of the graph rather than access some concrete properties with fixed names.</p>