DSLibrary/dslib — pull request #14 by nickb1080 (2014-09-17 05:40:59+00:00)
Title: [FEAT] Implement map data structure

(Fixed after problem with #13)

This PR implements the Map data structure.

Map is somewhat similar to a plain JavaScript object except any object can be used as a key. Thus, the following:
```js
var map = new Map();
var o1 = {};
var o2 = {};
map.add(o1, "abc");
map.add(o2, "def");
map.size() // 2
```

Due to the same issues with stringification mentioned in #11, lookup and insertion occur in linear time. Under the hood, Map uses a pair of arrays, with keys and values matched by their indexes.

This PR includes tests and Map is 100% covered.