These collections provide specialized alternatives to plain arrays and objects. They include the ability to observe all changes, have a common interface across every collection and work in both Node.js and the browser.
Some data structures are better suited for specific problems. The collections package gives you the freedom to experiment with different approaches, without having to change your existing usage.
Each collection implements generic methods, many already familiar from ordinary Arrays, and many new methods that will enrich your toolset.
Add to your project with npm:
npm install --save collections
and use by requiring each collection as needed:
var LruMap = require("collections/lru-map");
Works in Node.js, Browserify and Mr.