{"_id":"harmony-collections","_rev":"72-030716104da70bffdf14f8e0b1acef45","name":"harmony-collections","description":"Shim to provide Map, Set, and WeakMap if they're not available, with non-leaky O(1) lookup WeakMaps","dist-tags":{"latest":"0.3.8"},"versions":{"0.0.1":{"author":{"name":"Brandon Benvie","email":"brandon@bbenvie.com","url":"http://bbenvie.com"},"name":"harmony-collections","description":"Shim to provide Map, Set, and WeakMap if they're not available","version":"0.0.1","homepage":"https://github.com/Benvie/ES6-Harmony-Collections-Shim","repository":{"type":"git","url":"git://github.com/Benvie/ES6-Harmony-Collections-Shim.git"},"main":"harmony-collections.js","engines":{"node":"0.6"},"dependencies":{},"devDependencies":{},"_npmUser":{"name":"benvie","email":"brandon@bbenvie.com"},"_id":"harmony-collections@0.0.1","_engineSupported":false,"_npmVersion":"1.1.0-alpha-6","_nodeVersion":"v0.7.0-pre","_defaultsLoaded":true,"dist":{"shasum":"8fbd15a16e25f78928616ba9af787fb209c51f2e","tarball":"https://registry.npmjs.org/harmony-collections/-/harmony-collections-0.0.1.tgz","integrity":"sha512-0Bp+cx1L+hZlg1vxjywgZkUaN7m1ONE1wsEzXCYJdnwDW+wJDqsIMyFEgNCra5+ZRSmXtY3vPtUJfMDQJI0Kmw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEupSM7umqlzNXo3Q3LCfVuk0JbPtNNKA32+1P+ej3N3AiB4JA9AqpNlmAfra2Nojl8EXbxqkXsc0sUR70VWuh1QIQ=="}]},"maintainers":[{"name":"benvie","email":"brandon@bbenvie.com"}]},"0.0.2":{"author":{"name":"Brandon Benvie","email":"brandon@bbenvie.com","url":"http://bbenvie.com"},"name":"harmony-collections","description":"Shim to provide Map, Set, and WeakMap if they're not available","version":"0.0.2","homepage":"https://github.com/Benvie/ES6-Harmony-Collections-Shim","repository":{"type":"git","url":"git://github.com/Benvie/ES6-Harmony-Collections-Shim.git"},"main":"harmony-collections.js","engines":{"node":"0.6"},"dependencies":{},"devDependencies":{},"_npmUser":{"name":"benvie","email":"brandon@bbenvie.com"},"_id":"harmony-collections@0.0.2","_engineSupported":false,"_npmVersion":"1.1.0-alpha-6","_nodeVersion":"v0.7.0-pre","_defaultsLoaded":true,"dist":{"shasum":"bdee934970bd8e103194e909e8f4447e8420c4b5","tarball":"https://registry.npmjs.org/harmony-collections/-/harmony-collections-0.0.2.tgz","integrity":"sha512-kVv/yFLC5+RtRK4zR5noYVUVhl4LRZwYVjXmP5BgSurT7rEn4r/Ngo/1KP75r1N8F80Mtft9zJ3GxIyf+OK7Rw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID9qMcKN6HKppCHArNbzC2FUaCIK2unKr+uyfOD717/0AiAOTBesUp1gxxfFS0iiYooZl6aV4qsgYYOIh5+88jOL4A=="}]},"maintainers":[{"name":"benvie","email":"brandon@bbenvie.com"}]},"0.0.3":{"author":{"name":"Brandon Benvie","email":"brandon@bbenvie.com","url":"http://bbenvie.com"},"name":"harmony-collections","description":"Shim to provide Map, Set, and WeakMap if they're not available","version":"0.0.3","homepage":"https://github.com/Benvie/ES6-Harmony-Collections-Shim","repository":{"type":"git","url":"git://github.com/Benvie/ES6-Harmony-Collections-Shim.git"},"main":"harmony-collections.js","engines":{"node":"0.6"},"dependencies":{},"devDependencies":{},"_npmUser":{"name":"benvie","email":"brandon@bbenvie.com"},"_id":"harmony-collections@0.0.3","_engineSupported":false,"_npmVersion":"1.1.0-alpha-6","_nodeVersion":"v0.7.0-pre","_defaultsLoaded":true,"dist":{"shasum":"32b180c81ba7ff0a79325b88e8e28450a15f7235","tarball":"https://registry.npmjs.org/harmony-collections/-/harmony-collections-0.0.3.tgz","integrity":"sha512-AKrIJRSfhJgYH/xEVZ5lYkj6fxtbBQ1onG/jKsHytxWtcCxXmg/ZtDBIwnm0c4V/lHA0tM9k2fhgBgeAC+EZjg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC+JSWQyvyYsFw8tCwNcsv7FQjLe2w6gJbWv/YnCp8arQIhANHXIKrmwHK0D2dFvAW61/uTkIJlokh29ndoroIz73+v"}]},"maintainers":[{"name":"benvie","email":"brandon@bbenvie.com"}]},"0.0.4":{"author":{"name":"Brandon Benvie","email":"brandon@bbenvie.com","url":"http://bbenvie.com"},"name":"harmony-collections","description":"Shim to provide Map, Set, and WeakMap if they're not available","version":"0.0.4","homepage":"https://github.com/Benvie/ES6-Harmony-Collections-Shim","repository":{"type":"git","url":"git://github.com/Benvie/ES6-Harmony-Collections-Shim.git"},"main":"harmony-collections.js","engines":{"node":"0.6"},"dependencies":{},"devDependencies":{},"_npmUser":{"name":"benvie","email":"brandon@bbenvie.com"},"_id":"harmony-collections@0.0.4","_engineSupported":false,"_npmVersion":"1.1.0-alpha-6","_nodeVersion":"v0.7.0-pre","_defaultsLoaded":true,"dist":{"shasum":"f85b75a6835e9b371f9d1d7d3135cc6f5dbe6630","tarball":"https://registry.npmjs.org/harmony-collections/-/harmony-collections-0.0.4.tgz","integrity":"sha512-7g+paz9y8qS6wfmJzPAlynGznZhhD+KFeZuVqZKfqzVR0SSNqiMVwIfliPgTL0qqVisnwOziIlTnZL/VdphuWA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCfDJG1iSLDmnRbyLUQpcHc8anY5GopNltC5uzwlA9oKAIgDCzvrntK2nuViA2dejeXEjAsP5zA5X1qBB3+cBgtmw8="}]},"maintainers":[{"name":"benvie","email":"brandon@bbenvie.com"}]},"0.0.5":{"author":{"name":"Brandon Benvie","email":"brandon@bbenvie.com","url":"http://bbenvie.com"},"name":"harmony-collections","description":"Shim to provide Map, Set, and WeakMap if they're not available","version":"0.0.5","homepage":"https://github.com/Benvie/ES6-Harmony-Collections-Shim","repository":{"type":"git","url":"git://github.com/Benvie/ES6-Harmony-Collections-Shim.git"},"main":"harmony-collections.js","engines":{"node":"0.6"},"dependencies":{},"devDependencies":{},"_npmUser":{"name":"benvie","email":"brandon@bbenvie.com"},"_id":"harmony-collections@0.0.5","_engineSupported":false,"_npmVersion":"1.1.0-alpha-6","_nodeVersion":"v0.7.0-pre","_defaultsLoaded":true,"dist":{"shasum":"5b18d7b310d725bd5f6864bfe6484be35f64fcbb","tarball":"https://registry.npmjs.org/harmony-collections/-/harmony-collections-0.0.5.tgz","integrity":"sha512-VRYE+y0uy8I3FcMMTbjUiAwcyzeIsXESQw+L1Freooz5KD+hyDRTh5mEKdUKr0UCBoFI+LXKsm1dCDudgq1SKw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGVo8WQMds+wpiVxWtrVOtOBRktu55ZUaj/jUu7FePUoAiEAyqBfY3BqtPjdhrc/p+xeeX/iFbd1n+c2XuYU+jOCbx0="}]},"maintainers":[{"name":"benvie","email":"brandon@bbenvie.com"}]},"0.0.6":{"author":{"name":"Brandon Benvie","email":"brandon@bbenvie.com","url":"http://bbenvie.com"},"name":"harmony-collections","description":"Shim to provide Map, Set, and WeakMap if they're not available","version":"0.0.6","homepage":"https://github.com/Benvie/ES6-Harmony-Collections-Shim","repository":{"type":"git","url":"git://github.com/Benvie/ES6-Harmony-Collections-Shim.git"},"main":"harmony-collections.js","engines":{"node":"0.6"},"dependencies":{},"devDependencies":{},"_npmUser":{"name":"benvie","email":"brandon@bbenvie.com"},"_id":"harmony-collections@0.0.6","_engineSupported":false,"_npmVersion":"1.1.0-alpha-6","_nodeVersion":"v0.7.0-pre","_defaultsLoaded":true,"dist":{"shasum":"671e7bc6a4f23dd772e89a205f63dc1cc9063de0","tarball":"https://registry.npmjs.org/harmony-collections/-/harmony-collections-0.0.6.tgz","integrity":"sha512-Bu/2QujlUGZPL41tuIesqdmzP4+dskPOeFPSuCFLXQuw8R96hjouzorwro5nvB6n0eqzbebGSEgfTrIHerjHeg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAzZR0HJgz73ZCegv2fbCtDMebU8gSHL2FkNbezucwaZAiBzBEUa1cLgcZVee2e/CzEo2Ra399l7zV1rzek3wj/FCQ=="}]},"maintainers":[{"name":"benvie","email":"brandon@bbenvie.com"}]},"0.0.7":{"author":{"name":"Brandon Benvie","email":"brandon@bbenvie.com","url":"http://bbenvie.com"},"name":"harmony-collections","description":"Shim to provide Map, Set, and WeakMap if they're not available","version":"0.0.7","homepage":"https://github.com/Benvie/ES6-Harmony-Collections-Shim","repository":{"type":"git","url":"git://github.com/Benvie/ES6-Harmony-Collections-Shim.git"},"main":"harmony-collections.js","engines":{"node":"0.6"},"dependencies":{},"devDependencies":{},"_npmUser":{"name":"benvie","email":"brandon@bbenvie.com"},"_id":"harmony-collections@0.0.7","_engineSupported":false,"_npmVersion":"1.1.0-alpha-6","_nodeVersion":"v0.7.0-pre","_defaultsLoaded":true,"dist":{"shasum":"9ce3c76646435a243988a33f7ae4160cd1b3a020","tarball":"https://registry.npmjs.org/harmony-collections/-/harmony-collections-0.0.7.tgz","integrity":"sha512-sRYIFYcHpcR/tu+1YZ+a6xU0LxH+U9xFAQHqx/dFdiTtCjZIy4dE8S3Hkhhrl2JEE5RMFh6voNvenW3NHYMY+w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICf0rjkoJz85mNn7WHnQsua762RbezmcaPIM+2w+5RwEAiA/9MTAaikeKXjWBhNsb16hmwS6Od6w2G+AxOyzpkK9kw=="}]},"maintainers":[{"name":"benvie","email":"brandon@bbenvie.com"}]},"0.0.8":{"author":{"name":"Brandon Benvie","email":"brandon@bbenvie.com","url":"http://bbenvie.com"},"name":"harmony-collections","description":"Shim to provide Map, Set, and WeakMap if they're not available","version":"0.0.8","homepage":"https://github.com/Benvie/ES6-Harmony-Collections-Shim","repository":{"type":"git","url":"git://github.com/Benvie/ES6-Harmony-Collections-Shim.git"},"main":"harmony-collections.js","engines":{"node":"0.6"},"dependencies":{},"devDependencies":{},"_npmUser":{"name":"benvie","email":"brandon@bbenvie.com"},"_id":"harmony-collections@0.0.8","_engineSupported":false,"_npmVersion":"1.1.0-alpha-6","_nodeVersion":"v0.7.0-pre","_defaultsLoaded":true,"dist":{"shasum":"baff08f6996b67b78af36850a4b5d341019a8e36","tarball":"https://registry.npmjs.org/harmony-collections/-/harmony-collections-0.0.8.tgz","integrity":"sha512-s1x/BZzVKH/L91SN68FGYXTqLGLLbeH/TUAhgpeNCL6CJeg0df1/wJUfw+6hYa1Slt2Q4rivFldw7+Py7ctz/w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCbqwYKWEoPbxzKtFdWTH4BfyL9yPJ/WFtDY9ab0EqqwwIgRaRQEEapN99P74f3+aMqP/EbRn3qAeeP4BbU0cYb5cU="}]},"maintainers":[{"name":"benvie","email":"brandon@bbenvie.com"}]},"0.0.9":{"author":{"name":"Brandon Benvie","email":"brandon@bbenvie.com","url":"http://bbenvie.com"},"name":"harmony-collections","description":"Shim to provide Map, Set, and WeakMap if they're not available","version":"0.0.9","homepage":"https://github.com/Benvie/ES6-Harmony-Collections-Shim","repository":{"type":"git","url":"git://github.com/Benvie/ES6-Harmony-Collections-Shim.git"},"main":"harmony-collections.js","engines":{"node":"0.6"},"dependencies":{},"devDependencies":{},"_npmUser":{"name":"benvie","email":"brandon@bbenvie.com"},"_id":"harmony-collections@0.0.9","_engineSupported":false,"_npmVersion":"1.1.0-alpha-6","_nodeVersion":"v0.7.0-pre","_defaultsLoaded":true,"dist":{"shasum":"50909e12bd32fb3a7baf902b29e6c255addf6c30","tarball":"https://registry.npmjs.org/harmony-collections/-/harmony-collections-0.0.9.tgz","integrity":"sha512-f0RgSfMTvrIQk6REfErniZe6adwgml9eidJhuBREvzszUIX9xt7XUNZcDaYtMrrGoURt6JDKa4m4ep2KTB5MVw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE+8gxdUIwcaHB7sGPw+LNqDBm9GnH557mpB8RoUa3a+AiEA3oxVqkLCAuAzPP1XlgDUHZ6WM0oAMOCMtveSN3noHy4="}]},"maintainers":[{"name":"benvie","email":"brandon@bbenvie.com"}]},"0.1.0":{"author":{"name":"Brandon Benvie","email":"brandon@bbenvie.com","url":"http://bbenvie.com"},"name":"harmony-collections","description":"Shim to provide Map, Set, and WeakMap if they're not available","version":"0.1.0","homepage":"https://github.com/Benvie/ES6-Harmony-Collections-Shim","repository":{"type":"git","url":"git://github.com/Benvie/ES6-Harmony-Collections-Shim.git"},"main":"harmony-collections.js","engines":{"node":"0.6"},"dependencies":{},"devDependencies":{},"_npmUser":{"name":"benvie","email":"brandon@bbenvie.com"},"_id":"harmony-collections@0.1.0","_engineSupported":false,"_npmVersion":"1.1.0-alpha-6","_nodeVersion":"v0.7.0-pre","_defaultsLoaded":true,"dist":{"shasum":"795fb4af00298efa4b288ec81e8607802f41af41","tarball":"https://registry.npmjs.org/harmony-collections/-/harmony-collections-0.1.0.tgz","integrity":"sha512-yZm+/GK+sb/lwkCjxEtuuLza0DGXIBjKtUCZQxprGtAAE/3ewE636ZOZmdbePVg4tZuwF7+NHCqpWPS1u7FAgg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD/70dvrSGHUzHZ7655UDyqC/3v0a/BHkezYK7+HpRd3AIhAJRX4ySai8fcXVDL9Zepbqrp9fT1RfJk82uN6OwbqjJY"}]},"maintainers":[{"name":"benvie","email":"brandon@bbenvie.com"}]},"0.1.1":{"author":{"name":"Brandon Benvie","email":"brandon@bbenvie.com","url":"http://bbenvie.com"},"name":"harmony-collections","description":"Shim to provide Map, Set, and WeakMap if they're not available","version":"0.1.1","homepage":"https://github.com/Benvie/ES6-Harmony-Collections-Shim","repository":{"type":"git","url":"git://github.com/Benvie/ES6-Harmony-Collections-Shim.git"},"main":"harmony-collections.js","engines":{"node":"0.6"},"dependencies":{},"devDependencies":{},"_npmUser":{"name":"benvie","email":"brandon@bbenvie.com"},"_id":"harmony-collections@0.1.1","_engineSupported":false,"_npmVersion":"1.1.0-beta-4","_nodeVersion":"v0.7.0-pre","_defaultsLoaded":true,"dist":{"shasum":"746f7cdb590b267a84d5114c8aa993b8a83c7959","tarball":"https://registry.npmjs.org/harmony-collections/-/harmony-collections-0.1.1.tgz","integrity":"sha512-8SI7wTLlgpntl8hhX9VTbeo3Yp9cKoNIa/47y1zrTjAaUhJh8TpYCNIlEXmq3I5I8vdHSB+85kb1qO/t0HFBUg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCKZe2JTn0cVpP7YMJbSHWHoX/Fw3wtLlA5ySiluiwkhAIgIQBR5JVAs7hZKnteNG5Nh435B8SdWdl9bgg7/Mv/t80="}]},"readme":"# Harmony Collections Shim\n\nProvides Map, Set, and WeakMap with the same usage as the new ES6 native versions. Values in Harmony Collections are not contained in the collection instance itself, like array items and object properties, but in a private store. It's not possible to get access to or inspect the store directly.\n\nFor WeakMaps this means there's no way to find what's inside it or how many items are contained, and the only way to get a reference to a value is if you have a direct reference to the key object that links to it.\n\nWeakMap won't give the same garbage collector magic as the native one but it can be used with the same code.\n\n\n# Shim Usage\n\nThe function `attachIfMissing` is exported along with Map, WeakMap, and Set which will inspect the global object for the existence of Map, WeakMap, and Set in turn and add ones that are missing. Each one is checked separately because WeakMap's existence predates the other two so there's no guarantee which may already exist. If the global object is the window then `attach` is automatically executed.\n\n\n# Collections Usage\n\nMaps, WeakMaps, and Sets can each be created using their constructor with or without `new`. Examples:\n\n    var aWeakMap = new WeakMap;\n    var aMap = Map();\n    var aSet = new Set();\n\nItems in a collection do not appear in any manner through traditional inspection. The only way to interact with the data contained in a collection is by using the functions below.\n\n    var aWeakMap = new WeakMap;\n    aWeakMap.set(this, { secrets: 'Dark Secrets' });\n    console.log(Object.getOwnPropertyNames(aWeakMap)); // []\n    for (var k in aWeakMap) { console.log(k); }         // nothing\n    console.log(aWeakMap.get(this));                    // { secrets: 'Dark Secrets' }\n\n\n# WeakMap\n\nWeakMaps require the use of objects as keys; primitives are not valid keys. Keys are per WeakMap are unique and setting the same key will overwrite the old value. WeakMaps provide for no method of iteration or listing the keys or values contained inside. Because WeakMaps expose no method of listing keys or values, and keys are required to be full-fledged objects with unique identities, the only way to extract a value from it is by having a direct reference to the object used as the key.\n\n* __set__ `weakmap.set(key, value)`. Key is any value including objects. Only non-primitives can be used as keys.\n* __get__ `weakmap.get(key)`. Returns the value that key corresponds to the key or undefined.\n* __has__ `weakmap.has(key)`. Returns boolean.\n* __delete__ `weakmap.delete(key)`. Removes value from the WeakMap if found. Returns true.\n\nWeakMaps allow for some interesting use cases like anonymous communication channels where neither side can identify the other, and no one else can eavesdrop. By using using a target object as its own key to retrieve a hidden seceret value no information about the origin can be obtained.\n\n*All non-primitives* are valid keys, including WeakMaps themselves.\n\n\n# Map\n\nMaps are much the same as WeakMaps but they can be iterated and thus their contents can be inspected. Many use cases have no requirement for anonymity or special garbage collection, but can benefit from using objects as keys and also not having the storage contained in the Map itself.\n\n* __set__ `map.set(key, value)`. Key is any value including objects. Primitives are valid keys but uniqueness is matched by their value since primitives don't have identity. Objects are matched by identity. Returns the value passed in.\n* __get__ `map.get(key)`. Returns the value that key corresponds to or undefined.\n* __has__ `map.has(key)`. Returns boolean.\n* __delete__ `map.delete(key)`. Removes value from the Map if found. Returns true.\n* __keys__ `map.keys()`. Returns array of contained keys.\n* __values__ `map.values()`. Return array of contained values.\n* __iterate__ `map.iterate(callback, context)`. Loop through the Map executing callback with the signature `callback.call(context || null, key, value, index)`.\n\n*All possible values* are valid keys, including undefined, null, and NaN.\n\n\n# Set\n\nSets are similar to arrays but enforce uniqueness of values. Adding the same value twice will only result in one being added to the set.\n\n* __add__ `set.add(value)`. Inserts a value of any type into the set if it's not already in the set.\n* __has__ `set.has(value)`. Returns boolean.\n* __delete__ `set.delete(value)`. Removes value from the Set if found. Returns true.\n* __values__ `set.values()`. Return array of contained values.\n* __iterate__ `set.iterate(callback, context)`. Loop through the Set executing callback with the signature `callback.call(context || null, value, index)`.\n\n\n# TODO\n\n* Check up on iteration semantics for ES6 as they stand now.","maintainers":[{"name":"benvie","email":"brandon@bbenvie.com"}]},"0.1.2":{"author":{"name":"Brandon Benvie","email":"brandon@bbenvie.com","url":"http://bbenvie.com"},"name":"harmony-collections","description":"Shim to provide Map, Set, and WeakMap if they're not available","version":"0.1.2","homepage":"https://github.com/Benvie/ES6-Harmony-Collections-Shim","repository":{"type":"git","url":"git://github.com/Benvie/ES6-Harmony-Collections-Shim.git"},"main":"harmony-collections.js","engines":{"node":"0.6"},"dependencies":{},"devDependencies":{},"_npmUser":{"name":"benvie","email":"brandon@bbenvie.com"},"_id":"harmony-collections@0.1.2","_engineSupported":false,"_npmVersion":"1.1.0-beta-4","_nodeVersion":"v0.7.0-pre","_defaultsLoaded":true,"dist":{"shasum":"47573e1c93e89f958a5e51eafc03e3b1c056613d","tarball":"https://registry.npmjs.org/harmony-collections/-/harmony-collections-0.1.2.tgz","integrity":"sha512-S3J0RK3EWkZWk6VwjmvRxSTyI5muFJRguf8z/cRQaU725chdGEjiWrhTprIRwyIogxuBZERzzguc3zQOgwoDIg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDO2A+YptYZD4LqWSooUr6A/Ocn+m9e9Eql1A41R/RYEAIhANY82/E+OfOPeN4qYpQgztHiw8RE1+qfO8ps6lUZ2INE"}]},"readme":"# Harmony Collections Shim\n\nProvides Map, Set, and WeakMap with the same usage as the new ES6 native versions. Values in Harmony Collections are not contained in the collection instance itself, like array items and object properties, but in a private store. It's not possible to get access to or inspect the store directly.\n\nFor WeakMaps this means there's no way to find what's inside it or how many items are contained, and the only way to get a reference to a value is if you have a direct reference to the key object that links to it.\n\nWeakMap won't give the same garbage collector magic as the native one but it can be used with the same code.\n\n\n# Shim Usage\n\nThe function `attachIfMissing` is exported along with Map, WeakMap, and Set which will inspect the global object for the existence of Map, WeakMap, and Set in turn and add ones that are missing. Each one is checked separately because WeakMap's existence predates the other two so there's no guarantee which may already exist. If the global object is the window then `attach` is automatically executed.\n\n\n# Collections Usage\n\nMaps, WeakMaps, and Sets can each be created using their constructor with or without `new`. Examples:\n\n    var aWeakMap = new WeakMap;\n    var aMap = Map();\n    var aSet = new Set();\n\nItems in a collection do not appear in any manner through traditional inspection. The only way to interact with the data contained in a collection is by using the functions below.\n\n    var aWeakMap = new WeakMap;\n    aWeakMap.set(this, { secrets: 'Dark Secrets' });\n    console.log(Object.getOwnPropertyNames(aWeakMap)); // []\n    for (var k in aWeakMap) { console.log(k); }         // nothing\n    console.log(aWeakMap.get(this));                    // { secrets: 'Dark Secrets' }\n\n\n# WeakMap\n\nWeakMaps require the use of objects as keys; primitives are not valid keys. Keys are per WeakMap are unique and setting the same key will overwrite the old value. WeakMaps provide for no method of iteration or listing the keys or values contained inside. Because WeakMaps expose no method of listing keys or values, and keys are required to be full-fledged objects with unique identities, the only way to extract a value from it is by having a direct reference to the object used as the key.\n\n* __set__ `weakmap.set(key, value)`. Key is any value including objects. Only non-primitives can be used as keys.\n* __get__ `weakmap.get(key)`. Returns the value that key corresponds to the key or undefined.\n* __has__ `weakmap.has(key)`. Returns boolean.\n* __delete__ `weakmap.delete(key)`. Removes value from the WeakMap if found. Returns true.\n\nWeakMaps allow for some interesting use cases like anonymous communication channels where neither side can identify the other, and no one else can eavesdrop. By using using a target object as its own key to retrieve a hidden seceret value no information about the origin can be obtained.\n\n*All non-primitives* are valid keys, including WeakMaps themselves.\n\n\n# Map\n\nMaps are much the same as WeakMaps but they can be iterated and thus their contents can be inspected. Many use cases have no requirement for anonymity or special garbage collection, but can benefit from using objects as keys and also not having the storage contained in the Map itself.\n\n* __set__ `map.set(key, value)`. Key is any value including objects. Primitives are valid keys but uniqueness is matched by their value since primitives don't have identity. Objects are matched by identity. Returns the value passed in.\n* __get__ `map.get(key)`. Returns the value that key corresponds to or undefined.\n* __has__ `map.has(key)`. Returns boolean.\n* __delete__ `map.delete(key)`. Removes value from the Map if found. Returns true.\n* __keys__ `map.keys()`. Returns array of contained keys.\n* __values__ `map.values()`. Return array of contained values.\n* __iterate__ `map.iterate(callback, context)`. Loop through the Map executing callback with the signature `callback.call(context || null, key, value, index)`.\n\n*All possible values* are valid keys, including undefined, null, and NaN.\n\n\n# Set\n\nSets are similar to arrays but enforce uniqueness of values. Adding the same value twice will only result in one being added to the set.\n\n* __add__ `set.add(value)`. Inserts a value of any type into the set if it's not already in the set.\n* __has__ `set.has(value)`. Returns boolean.\n* __delete__ `set.delete(value)`. Removes value from the Set if found. Returns true.\n* __values__ `set.values()`. Return array of contained values.\n* __iterate__ `set.iterate(callback, context)`. Loop through the Set executing callback with the signature `callback.call(context || null, value, index)`.\n\n\n# TODO\n\n* Check up on iteration semantics for ES6 as they stand now.","maintainers":[{"name":"benvie","email":"brandon@bbenvie.com"}]},"0.1.3":{"author":{"name":"Brandon Benvie","email":"brandon@bbenvie.com","url":"http://bbenvie.com"},"name":"harmony-collections","description":"Shim to provide Map, Set, and WeakMap if they're not available","keywords":["harmony","collection","weakmap","map","set","ecmascript","shim"],"version":"0.1.3","homepage":"https://github.com/Benvie/ES6-Harmony-Collections-Shim","repository":{"type":"git","url":"git://github.com/Benvie/ES6-Harmony-Collections-Shim.git"},"main":"harmony-collections.js","engines":{"node":"0.6"},"dependencies":{},"devDependencies":{},"_npmUser":{"name":"benvie","email":"brandon@bbenvie.com"},"_id":"harmony-collections@0.1.3","_engineSupported":false,"_npmVersion":"1.1.0-beta-4","_nodeVersion":"v0.7.0-pre","_defaultsLoaded":true,"dist":{"shasum":"98ed483642d7a098f417c4f6b20c89f5c18b87a4","tarball":"https://registry.npmjs.org/harmony-collections/-/harmony-collections-0.1.3.tgz","integrity":"sha512-zLEQXjFbeb9GNVxSeBDwZLqkl5ylHNvgm3yvsmVTgdGb5lfQ7/FFPqiqcALI5LjVBCEblPJ6ac3DIssWKIbF2g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBEWU465CIJ8FoPaR2aO7lYUlY2ADwcagLy0hNPfuQAqAiBLB8L3YUDuEUBUJmIVvNErL7gn8GbQhGQ7Ihla8nw/xw=="}]},"readme":"# Harmony Collections Shim\n\nProvides Map, Set, and WeakMap with the same usage as the new ES6 native versions. Values in Harmony Collections are not contained in the collection instance itself, like array items and object properties, but in a private store. It's not possible to get access to or inspect the store directly.\n\nFor WeakMaps this means there's no way to find what's inside it or how many items are contained, and the only way to get a reference to a value is if you have a direct reference to the key object that links to it.\n\nWeakMap won't give the same garbage collector magic as the native one but it can be used with the same code.\n\n\n# Shim Usage\n\nThe function `attachIfMissing` is exported along with Map, WeakMap, and Set which will inspect the global object for the existence of Map, WeakMap, and Set in turn and add ones that are missing. Each one is checked separately because WeakMap's existence predates the other two so there's no guarantee which may already exist. If the global object is the window then `attach` is automatically executed.\n\n\n# Collections Usage\n\nMaps, WeakMaps, and Sets can each be created using their constructor with or without `new`. Examples:\n\n    var aWeakMap = new WeakMap;\n    var aMap = Map();\n    var aSet = new Set();\n\nItems in a collection do not appear in any manner through traditional inspection. The only way to interact with the data contained in a collection is by using the functions below.\n\n    var aWeakMap = new WeakMap;\n    aWeakMap.set(this, { secrets: 'Dark Secrets' });\n    console.log(Object.getOwnPropertyNames(aWeakMap)); // []\n    for (var k in aWeakMap) { console.log(k); }         // nothing\n    console.log(aWeakMap.get(this));                    // { secrets: 'Dark Secrets' }\n\n\n# WeakMap\n\nWeakMaps require the use of objects as keys; primitives are not valid keys. Keys are per WeakMap are unique and setting the same key will overwrite the old value. WeakMaps provide for no method of iteration or listing the keys or values contained inside. Because WeakMaps expose no method of listing keys or values, and keys are required to be full-fledged objects with unique identities, the only way to extract a value from it is by having a direct reference to the object used as the key.\n\n* __set__ `weakmap.set(key, value)`. Key is any value including objects. Only non-primitives can be used as keys.\n* __get__ `weakmap.get(key)`. Returns the value that key corresponds to the key or undefined.\n* __has__ `weakmap.has(key)`. Returns boolean.\n* __delete__ `weakmap.delete(key)`. Removes value from the WeakMap if found. Returns true.\n\nWeakMaps allow for some interesting use cases like anonymous communication channels where neither side can identify the other, and no one else can eavesdrop. By using using a target object as its own key to retrieve a hidden seceret value no information about the origin can be obtained.\n\n*All non-primitives* are valid keys, including WeakMaps themselves.\n\n\n# Map\n\nMaps are much the same as WeakMaps but they can be iterated and thus their contents can be inspected. Many use cases have no requirement for anonymity or special garbage collection, but can benefit from using objects as keys and also not having the storage contained in the Map itself.\n\n* __set__ `map.set(key, value)`. Key is any value including objects. Primitives are valid keys but uniqueness is matched by their value since primitives don't have identity. Objects are matched by identity. Returns the value passed in.\n* __get__ `map.get(key)`. Returns the value that key corresponds to or undefined.\n* __has__ `map.has(key)`. Returns boolean.\n* __delete__ `map.delete(key)`. Removes value from the Map if found. Returns true.\n* __keys__ `map.keys()`. Returns array of contained keys.\n* __values__ `map.values()`. Return array of contained values.\n* __iterate__ `map.iterate(callback, context)`. Loop through the Map executing callback with the signature `callback.call(context || null, key, value, index)`.\n\n*All possible values* are valid keys, including undefined, null, and NaN.\n\n\n# Set\n\nSets are similar to arrays but enforce uniqueness of values. Adding the same value twice will only result in one being added to the set.\n\n* __add__ `set.add(value)`. Inserts a value of any type into the set if it's not already in the set.\n* __has__ `set.has(value)`. Returns boolean.\n* __delete__ `set.delete(value)`. Removes value from the Set if found. Returns true.\n* __values__ `set.values()`. Return array of contained values.\n* __iterate__ `set.iterate(callback, context)`. Loop through the Set executing callback with the signature `callback.call(context || null, value, index)`.\n\n\n# TODO\n\n* Check up on iteration semantics for ES6 as they stand now.","maintainers":[{"name":"benvie","email":"brandon@bbenvie.com"}]},"0.1.4":{"author":{"name":"Brandon Benvie","email":"brandon@bbenvie.com","url":"http://bbenvie.com"},"name":"harmony-collections","description":"Shim to provide Map, Set, and WeakMap if they're not available","keywords":["harmony","collection","weakmap","map","set","ecmascript","shim"],"version":"0.1.4","homepage":"https://github.com/Benvie/ES6-Harmony-Collections-Shim","repository":{"type":"git","url":"git://github.com/Benvie/ES6-Harmony-Collections-Shim.git"},"main":"harmony-collections.js","engines":{"node":"0.6"},"dependencies":{},"devDependencies":{},"_npmUser":{"name":"benvie","email":"brandon@bbenvie.com"},"_id":"harmony-collections@0.1.4","_engineSupported":false,"_npmVersion":"1.1.0-beta-4","_nodeVersion":"v0.7.0-pre","_defaultsLoaded":true,"dist":{"shasum":"10d54cd8229b647f6f7cf31490e86edb315b47f1","tarball":"https://registry.npmjs.org/harmony-collections/-/harmony-collections-0.1.4.tgz","integrity":"sha512-eJS40Ob4wcGsV53GXi/7tE9oJXqoYJmwe6774M3X+fd2bgIDXJb712gye1fI9j+workEntcgbCIYoUrMhaUc3A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDFVKUJKRJRHI0jCELDzRbLvo+SFctfXKi3jYU0c/1yJQIhAI0XV0rZpS+rsdF1pl1rcfqq3CMMFXFZ+yLydT4Q5YlM"}]},"readme":"# Harmony Collections Shim\n\nProvides Map, Set, and WeakMap with the same usage as the new ES6 native versions. Values in Harmony Collections are not contained in the collection instance itself, like array items and object properties, but in a private store. It's not possible to get access to or inspect the store directly.\n\nFor WeakMaps this means there's no way to find what's inside it or how many items are contained, and the only way to get a reference to a value is if you have a direct reference to the key object that links to it.\n\nWeakMap won't give the same garbage collector magic as the native one but it can be used with the same code.\n\n\n# Shim Usage\n\nThe function `attachIfMissing` is exported along with Map, WeakMap, and Set which will inspect the global object for the existence of Map, WeakMap, and Set in turn and add ones that are missing. Each one is checked separately because WeakMap's existence predates the other two so there's no guarantee which may already exist. If the global object is the window then `attach` is automatically executed.\n\n\n# Collections Usage\n\nMaps, WeakMaps, and Sets can each be created using their constructor with or without `new`. Examples:\n\n    var aWeakMap = new WeakMap;\n    var aMap = Map();\n    var aSet = new Set();\n\nItems in a collection do not appear in any manner through traditional inspection. The only way to interact with the data contained in a collection is by using the functions below.\n\n    var aWeakMap = new WeakMap;\n    aWeakMap.set(this, { secrets: 'Dark Secrets' });\n    console.log(Object.getOwnPropertyNames(aWeakMap)); // []\n    for (var k in aWeakMap) { console.log(k); }         // nothing\n    console.log(aWeakMap.get(this));                    // { secrets: 'Dark Secrets' }\n\n\n# WeakMap\n\nWeakMaps require the use of objects as keys; primitives are not valid keys. Keys are per WeakMap are unique and setting the same key will overwrite the old value. WeakMaps provide for no method of iteration or listing the keys or values contained inside. Because WeakMaps expose no method of listing keys or values, and keys are required to be full-fledged objects with unique identities, the only way to extract a value from it is by having a direct reference to the object used as the key.\n\n* __set__ `weakmap.set(key, value)`. Key is any value including objects. Only non-primitives can be used as keys.\n* __get__ `weakmap.get(key)`. Returns the value that key corresponds to the key or undefined.\n* __has__ `weakmap.has(key)`. Returns boolean.\n* __delete__ `weakmap.delete(key)`. Removes value from the WeakMap if found. Returns true.\n\nWeakMaps allow for some interesting use cases like anonymous communication channels where neither side can identify the other, and no one else can eavesdrop. By using using a target object as its own key to retrieve a hidden seceret value no information about the origin can be obtained.\n\n*All non-primitives* are valid keys, including WeakMaps themselves.\n\n\n# Map\n\nMaps are much the same as WeakMaps but they can be iterated and thus their contents can be inspected. Many use cases have no requirement for anonymity or special garbage collection, but can benefit from using objects as keys and also not having the storage contained in the Map itself.\n\n* __set__ `map.set(key, value)`. Key is any value including objects. Primitives are valid keys but uniqueness is matched by their value since primitives don't have identity. Objects are matched by identity. Returns the value passed in.\n* __get__ `map.get(key)`. Returns the value that key corresponds to or undefined.\n* __has__ `map.has(key)`. Returns boolean.\n* __delete__ `map.delete(key)`. Removes value from the Map if found. Returns true.\n* __keys__ `map.keys()`. Returns array of contained keys.\n* __values__ `map.values()`. Return array of contained values.\n* __iterate__ `map.iterate(callback, context)`. Loop through the Map executing callback with the signature `callback.call(context || null, key, value, index)`.\n\n*All possible values* are valid keys, including undefined, null, and NaN.\n\n\n# Set\n\nSets are similar to arrays but enforce uniqueness of values. Adding the same value twice will only result in one being added to the set.\n\n* __add__ `set.add(value)`. Inserts a value of any type into the set if it's not already in the set.\n* __has__ `set.has(value)`. Returns boolean.\n* __delete__ `set.delete(value)`. Removes value from the Set if found. Returns true.\n* __values__ `set.values()`. Return array of contained values.\n* __iterate__ `set.iterate(callback, context)`. Loop through the Set executing callback with the signature `callback.call(context || null, value, index)`.\n\n\n# TODO\n\n* Check up on iteration semantics for ES6 as they stand now.","maintainers":[{"name":"benvie","email":"brandon@bbenvie.com"}]},"0.1.5":{"author":{"name":"Brandon Benvie","email":"brandon@bbenvie.com","url":"http://bbenvie.com"},"name":"harmony-collections","description":"Shim to provide Map, Set, and WeakMap if they're not available","keywords":["harmony","collection","weakmap","map","set","ecmascript","shim"],"version":"0.1.5","homepage":"https://github.com/Benvie/ES6-Harmony-Collections-Shim","repository":{"type":"git","url":"git://github.com/Benvie/ES6-Harmony-Collections-Shim.git"},"main":"harmony-collections.js","engines":{"node":"0.6"},"dependencies":{},"devDependencies":{},"_npmUser":{"name":"benvie","email":"brandon@bbenvie.com"},"_id":"harmony-collections@0.1.5","_engineSupported":false,"_npmVersion":"1.1.0-beta-4","_nodeVersion":"v0.7.0-pre","_defaultsLoaded":true,"dist":{"shasum":"01ef4705e2544fa204a1d69d8691cf4efc29a7b0","tarball":"https://registry.npmjs.org/harmony-collections/-/harmony-collections-0.1.5.tgz","integrity":"sha512-CksBQhOfaC8zCo+QM16AY4TBj9RlhT1LOxRSrizMMSxmacthpWq41SJTUsy49oEsdUnlB3OrkKdAgUXm1EIH2w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDIg1yv+2yRt1yknTlKY5D39FcwYrGb/bv/ISQT6IcutgIgD4fHQj/j14DppIIlMcX5WsTYSzQRiq1F0ZhTWNayPUM="}]},"readme":"# Harmony Collections Shim\n\nProvides Map, Set, and WeakMap with the same usage as the new ES6 native versions. Values in Harmony Collections are not contained in the collection instance itself, like array items and object properties, but in a private store. It's not possible to get access to or inspect the store directly.\n\nFor WeakMaps this means there's no way to find what's inside it or how many items are contained, and the only way to get a reference to a value is if you have a direct reference to the key object that links to it.\n\nWeakMap won't give the same garbage collector magic as the native one but it can be used with the same code.\n\n\n# Shim Usage\n\nThe function `attachIfMissing` is exported along with Map, WeakMap, and Set which will inspect the global object for the existence of Map, WeakMap, and Set in turn and add ones that are missing. Each one is checked separately because WeakMap's existence predates the other two so there's no guarantee which may already exist. If the global object is the window then `attach` is automatically executed.\n\n\n# Collections Usage\n\nMaps, WeakMaps, and Sets can each be created using their constructor with or without `new`. Examples:\n\n    var aWeakMap = new WeakMap;\n    var aMap = Map();\n    var aSet = new Set();\n\nItems in a collection do not appear in any manner through traditional inspection. The only way to interact with the data contained in a collection is by using the functions below.\n\n    var aWeakMap = new WeakMap;\n    aWeakMap.set(this, { secrets: 'Dark Secrets' });\n    console.log(Object.getOwnPropertyNames(aWeakMap)); // []\n    for (var k in aWeakMap) { console.log(k); }         // nothing\n    console.log(aWeakMap.get(this));                    // { secrets: 'Dark Secrets' }\n\n\n# WeakMap\n\nWeakMaps require the use of objects as keys; primitives are not valid keys. Keys are per WeakMap are unique and setting the same key will overwrite the old value. WeakMaps provide for no method of iteration or listing the keys or values contained inside. Because WeakMaps expose no method of listing keys or values, and keys are required to be full-fledged objects with unique identities, the only way to extract a value from it is by having a direct reference to the object used as the key.\n\n* __set__ `weakmap.set(key, value)`. Key is any value including objects. Only non-primitives can be used as keys.\n* __get__ `weakmap.get(key)`. Returns the value that key corresponds to the key or undefined.\n* __has__ `weakmap.has(key)`. Returns boolean.\n* __delete__ `weakmap.delete(key)`. Removes value from the WeakMap if found. Returns true.\n\nWeakMaps allow for some interesting use cases like anonymous communication channels where neither side can identify the other, and no one else can eavesdrop. By using using a target object as its own key to retrieve a hidden seceret value no information about the origin can be obtained.\n\n*All non-primitives* are valid keys, including WeakMaps themselves.\n\n\n# Map\n\nMaps are much the same as WeakMaps but they can be iterated and thus their contents can be inspected. Many use cases have no requirement for anonymity or special garbage collection, but can benefit from using objects as keys and also not having the storage contained in the Map itself.\n\n* __set__ `map.set(key, value)`. Key is any value including objects. Primitives are valid keys but uniqueness is matched by their value since primitives don't have identity. Objects are matched by identity. Returns the value passed in.\n* __get__ `map.get(key)`. Returns the value that key corresponds to or undefined.\n* __has__ `map.has(key)`. Returns boolean.\n* __delete__ `map.delete(key)`. Removes value from the Map if found. Returns true.\n* __keys__ `map.keys()`. Returns array of contained keys.\n* __values__ `map.values()`. Return array of contained values.\n* __iterate__ `map.iterate(callback, context)`. Loop through the Map executing callback with the signature `callback.call(context || null, key, value, index)`.\n\n*All possible values* are valid keys, including undefined, null, and NaN.\n\n\n# Set\n\nSets are similar to arrays but enforce uniqueness of values. Adding the same value twice will only result in one being added to the set.\n\n* __add__ `set.add(value)`. Inserts a value of any type into the set if it's not already in the set.\n* __has__ `set.has(value)`. Returns boolean.\n* __delete__ `set.delete(value)`. Removes value from the Set if found. Returns true.\n* __values__ `set.values()`. Return array of contained values.\n* __iterate__ `set.iterate(callback, context)`. Loop through the Set executing callback with the signature `callback.call(context || null, value, index)`.\n\n\n# TODO\n\n* Check up on iteration semantics for ES6 as they stand now.","maintainers":[{"name":"benvie","email":"brandon@bbenvie.com"}]},"0.1.6":{"author":{"name":"Brandon Benvie","email":"brandon@bbenvie.com","url":"http://bbenvie.com"},"name":"harmony-collections","description":"Shim to provide Map, Set, and WeakMap if they're not available","keywords":["harmony","collection","weakmap","map","set","ecmascript","shim"],"version":"0.1.6","homepage":"https://github.com/Benvie/ES6-Harmony-Collections-Shim","repository":{"type":"git","url":"git://github.com/Benvie/ES6-Harmony-Collections-Shim.git"},"main":"harmony-collections.js","engines":{"node":"0.6"},"dependencies":{},"devDependencies":{},"_npmUser":{"name":"benvie","email":"brandon@bbenvie.com"},"_id":"harmony-collections@0.1.6","_engineSupported":false,"_npmVersion":"1.1.0-beta-4","_nodeVersion":"v0.7.0-pre","_defaultsLoaded":true,"dist":{"shasum":"0814b97378125f5fd8ed6f2fb6b160750180ca2c","tarball":"https://registry.npmjs.org/harmony-collections/-/harmony-collections-0.1.6.tgz","integrity":"sha512-Ukosw0hcbJGRPP2ylY9vq2UzH7YTwdgkgFTE6R5bLHRiL/dlCzvWWI2QsWA6x9LgquXD4FFBa7LTiG6Y7XvChw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHW11P8e6fe+BESERH5pM/z8oHHsv+0+AEVjFmC/gmYaAiEAqCwcYR1EO52GqR47YZGOq9zgMPh5BHTgVylSAYoIfDU="}]},"readme":"# Harmony Collections Shim\n\nProvides Map, Set, and WeakMap with the same usage as the new ES6 native versions. Values in Harmony Collections are not contained in the collection instance itself, like array items and object properties, but in a private store. It's not possible to get access to or inspect the store directly.\n\nFor WeakMaps this means there's no way to find what's inside it or how many items are contained, and the only way to get a reference to a value is if you have a direct reference to the key object that links to it.\n\nWeakMap won't give the same garbage collector magic as the native one but it can be used with the same code.\n\n\n# Shim Usage\n\nThe function `attachIfMissing` is exported along with Map, WeakMap, and Set which will inspect the global object for the existence of Map, WeakMap, and Set in turn and add ones that are missing. Each one is checked separately because WeakMap's existence predates the other two so there's no guarantee which may already exist. If the global object is the window then `attach` is automatically executed.\n\n\n# Collections Usage\n\nMaps, WeakMaps, and Sets can each be created using their constructor with or without `new`. Examples:\n\n    var aWeakMap = new WeakMap;\n    var aMap = Map();\n    var aSet = new Set();\n\nItems in a collection do not appear in any manner through traditional inspection. The only way to interact with the data contained in a collection is by using the functions below.\n\n    var aWeakMap = new WeakMap;\n    aWeakMap.set(this, { secrets: 'Dark Secrets' });\n    console.log(Object.getOwnPropertyNames(aWeakMap)); // []\n    for (var k in aWeakMap) { console.log(k); }         // nothing\n    console.log(aWeakMap.get(this));                    // { secrets: 'Dark Secrets' }\n\n\n# WeakMap\n\nWeakMaps require the use of objects as keys; primitives are not valid keys. Keys are per WeakMap are unique and setting the same key will overwrite the old value. WeakMaps provide for no method of iteration or listing the keys or values contained inside. Because WeakMaps expose no method of listing keys or values, and keys are required to be full-fledged objects with unique identities, the only way to extract a value from it is by having a direct reference to the object used as the key.\n\n* __set__ `weakmap.set(key, value)`. Key is any value including objects. Only non-primitives can be used as keys.\n* __get__ `weakmap.get(key)`. Returns the value that key corresponds to the key or undefined.\n* __has__ `weakmap.has(key)`. Returns boolean.\n* __delete__ `weakmap.delete(key)`. Removes value from the WeakMap if found. Returns true.\n\nWeakMaps allow for some interesting use cases like anonymous communication channels where neither side can identify the other, and no one else can eavesdrop. By using using a target object as its own key to retrieve a hidden seceret value no information about the origin can be obtained.\n\n*All non-primitives* are valid keys, including WeakMaps themselves.\n\n\n# Map\n\nMaps are much the same as WeakMaps but they can be iterated and thus their contents can be inspected. Many use cases have no requirement for anonymity or special garbage collection, but can benefit from using objects as keys and also not having the storage contained in the Map itself.\n\n* __set__ `map.set(key, value)`. Key is any value including objects. Primitives are valid keys but uniqueness is matched by their value since primitives don't have identity. Objects are matched by identity. Returns the value passed in.\n* __get__ `map.get(key)`. Returns the value that key corresponds to or undefined.\n* __has__ `map.has(key)`. Returns boolean.\n* __delete__ `map.delete(key)`. Removes value from the Map if found. Returns true.\n* __keys__ `map.keys()`. Returns array of contained keys.\n* __values__ `map.values()`. Return array of contained values.\n* __iterate__ `map.iterate(callback, context)`. Loop through the Map executing callback with the signature `callback.call(context || null, key, value, index)`.\n\n*All possible values* are valid keys, including undefined, null, and NaN.\n\n\n# Set\n\nSets are similar to arrays but enforce uniqueness of values. Adding the same value twice will only result in one being added to the set.\n\n* __add__ `set.add(value)`. Inserts a value of any type into the set if it's not already in the set.\n* __has__ `set.has(value)`. Returns boolean.\n* __delete__ `set.delete(value)`. Removes value from the Set if found. Returns true.\n* __values__ `set.values()`. Return array of contained values.\n* __iterate__ `set.iterate(callback, context)`. Loop through the Set executing callback with the signature `callback.call(context || null, value, index)`.\n\n\n# TODO\n\n* Check up on iteration semantics for ES6 as they stand now.","maintainers":[{"name":"benvie","email":"brandon@bbenvie.com"}]},"0.1.7":{"author":{"name":"Brandon Benvie","email":"brandon@bbenvie.com","url":"http://bbenvie.com"},"name":"harmony-collections","description":"Shim to provide Map, Set, and WeakMap if they're not available","keywords":["harmony","collection","weakmap","map","set","ecmascript","shim"],"version":"0.1.7","homepage":"https://github.com/Benvie/ES6-Harmony-Collections-Shim","repository":{"type":"git","url":"git://github.com/Benvie/ES6-Harmony-Collections-Shim.git"},"main":"harmony-collections.js","engines":{"node":"0.6"},"dependencies":{},"devDependencies":{},"_npmUser":{"name":"benvie","email":"brandon@bbenvie.com"},"_id":"harmony-collections@0.1.7","_engineSupported":false,"_npmVersion":"1.1.0-beta-4","_nodeVersion":"v0.7.0-pre","_defaultsLoaded":true,"dist":{"shasum":"2b59551c1ca90c4b7de50d2d86cec54b5a2993cc","tarball":"https://registry.npmjs.org/harmony-collections/-/harmony-collections-0.1.7.tgz","integrity":"sha512-Q6IQm/bwu+i57tZ3285KZtgL6PQESoi1wH3p8iJJVesD+ReTkxCbP+SwO7l0GTqFlxObVsJNBWaNcpchHJzAWw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCEuxeIQIVOWpnK15iNNFUE18GJbUQGvEsitpd6TSSsggIhAJfpUji6Fxly08eHL39DoWmpkNovWfssS3BccP3X4Iwx"}]},"readme":"# Harmony Collections Shim\n\nProvides Map, Set, and WeakMap with the same usage as the new ES6 native versions. Values in Harmony Collections are not contained in the collection instance itself, like array items and object properties, but in a private store. It's not possible to get access to or inspect the store directly.\n\nFor WeakMaps this means there's no way to find what's inside it or how many items are contained, and the only way to get a reference to a value is if you have a direct reference to the key object that links to it.\n\nWeakMap won't give the same garbage collector magic as the native one but it can be used with the same code.\n\n\n# Shim Usage\n\nThe function `attachIfMissing` is exported along with Map, WeakMap, and Set which will inspect the global object for the existence of Map, WeakMap, and Set in turn and add ones that are missing. Each one is checked separately because WeakMap's existence predates the other two so there's no guarantee which may already exist. If the global object is the window then `attach` is automatically executed.\n\n\n# Collections Usage\n\nMaps, WeakMaps, and Sets can each be created using their constructor with or without `new`. Examples:\n\n    var aWeakMap = new WeakMap;\n    var aMap = Map();\n    var aSet = new Set();\n\nItems in a collection do not appear in any manner through traditional inspection. The only way to interact with the data contained in a collection is by using the functions below.\n\n    var aWeakMap = new WeakMap;\n    aWeakMap.set(this, { secrets: 'Dark Secrets' });\n    console.log(Object.getOwnPropertyNames(aWeakMap)); // []\n    for (var k in aWeakMap) { console.log(k); }         // nothing\n    console.log(aWeakMap.get(this));                    // { secrets: 'Dark Secrets' }\n\n\n# WeakMap\n\nWeakMaps require the use of objects as keys; primitives are not valid keys. Keys are per WeakMap are unique and setting the same key will overwrite the old value. WeakMaps provide for no method of iteration or listing the keys or values contained inside. Because WeakMaps expose no method of listing keys or values, and keys are required to be full-fledged objects with unique identities, the only way to extract a value from it is by having a direct reference to the object used as the key.\n\n* __set__ `weakmap.set(key, value)`. Key is any value including objects. Only non-primitives can be used as keys.\n* __get__ `weakmap.get(key)`. Returns the value that key corresponds to the key or undefined.\n* __has__ `weakmap.has(key)`. Returns boolean.\n* __delete__ `weakmap.delete(key)`. Removes value from the WeakMap if found. Returns true.\n\nWeakMaps allow for some interesting use cases like anonymous communication channels where neither side can identify the other, and no one else can eavesdrop. By using using a target object as its own key to retrieve a hidden seceret value no information about the origin can be obtained.\n\n*All non-primitives* are valid keys, including WeakMaps themselves.\n\n\n# Map\n\nMaps are much the same as WeakMaps but they can be iterated and thus their contents can be inspected. Many use cases have no requirement for anonymity or special garbage collection, but can benefit from using objects as keys and also not having the storage contained in the Map itself.\n\n* __set__ `map.set(key, value)`. Key is any value including objects. Primitives are valid keys but uniqueness is matched by their value since primitives don't have identity. Objects are matched by identity. Returns the value passed in.\n* __get__ `map.get(key)`. Returns the value that key corresponds to or undefined.\n* __has__ `map.has(key)`. Returns boolean.\n* __delete__ `map.delete(key)`. Removes value from the Map if found. Returns true.\n* __keys__ `map.keys()`. Returns array of contained keys.\n* __values__ `map.values()`. Return array of contained values.\n* __iterate__ `map.iterate(callback, context)`. Loop through the Map executing callback with the signature `callback.call(context || null, key, value, index)`.\n\n*All possible values* are valid keys, including undefined, null, and NaN.\n\n\n# Set\n\nSets are similar to arrays but enforce uniqueness of values. Adding the same value twice will only result in one being added to the set.\n\n* __add__ `set.add(value)`. Inserts a value of any type into the set if it's not already in the set.\n* __has__ `set.has(value)`. Returns boolean.\n* __delete__ `set.delete(value)`. Removes value from the Set if found. Returns true.\n* __values__ `set.values()`. Return array of contained values.\n* __iterate__ `set.iterate(callback, context)`. Loop through the Set executing callback with the signature `callback.call(context || null, value, index)`.\n\n\n# TODO\n\n* Check up on iteration semantics for ES6 as they stand now.","maintainers":[{"name":"benvie","email":"brandon@bbenvie.com"}]},"0.1.8":{"author":{"name":"Brandon Benvie","email":"brandon@bbenvie.com","url":"http://bbenvie.com"},"name":"harmony-collections","description":"Shim to provide Map, Set, and WeakMap if they're not available","keywords":["harmony","collection","weakmap","map","set","ecmascript","shim"],"version":"0.1.8","homepage":"https://github.com/Benvie/ES6-Harmony-Collections-Shim","repository":{"type":"git","url":"git://github.com/Benvie/ES6-Harmony-Collections-Shim.git"},"main":"harmony-collections.js","engines":{"node":"0.6"},"dependencies":{},"devDependencies":{},"_npmUser":{"name":"benvie","email":"brandon@bbenvie.com"},"_id":"harmony-collections@0.1.8","_engineSupported":false,"_npmVersion":"1.1.0-beta-4","_nodeVersion":"v0.7.0-pre","_defaultsLoaded":true,"dist":{"shasum":"9e1d85d40114ab82b499458fade39bb56611d404","tarball":"https://registry.npmjs.org/harmony-collections/-/harmony-collections-0.1.8.tgz","integrity":"sha512-4FE1Gp4o70PSwa4xdgFFuL6EzeVnUA6IMVPWYmtI+hJEjDnkaD0R+zusumTq0KhphhbwIBBDyV9WIXCeRIl7CA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDb9eQ1ZJg/kewhS3FxAfH45jZDsLzLmCTW9rwRG8tuPAiEA1kDmXwer7znNb0mCAdPGO6yjAl0gr/cd2Zr8ny1YHsA="}]},"readme":"# Harmony Collections Shim\n\nProvides Map, Set, and WeakMap with the same usage as the new ES6 native versions. Values in Harmony Collections are not contained in the collection instance itself, like array items and object properties, but in a private store. It's not possible to get access to or inspect the store directly.\n\nFor WeakMaps this means there's no way to find what's inside it or how many items are contained, and the only way to get a reference to a value is if you have a direct reference to the key object that links to it.\n\nWeakMap won't give the same garbage collector magic as the native one but it can be used with the same code.\n\n\n# Shim Usage\n\nThe function `attachIfMissing` is exported along with Map, WeakMap, and Set which will inspect the global object for the existence of Map, WeakMap, and Set in turn and add ones that are missing. Each one is checked separately because WeakMap's existence predates the other two so there's no guarantee which may already exist. If the global object is the window then `attach` is automatically executed.\n\n\n# Collections Usage\n\nMaps, WeakMaps, and Sets can each be created using their constructor with or without `new`. Examples:\n\n    var aWeakMap = new WeakMap;\n    var aMap = Map();\n    var aSet = new Set();\n\nItems in a collection do not appear in any manner through traditional inspection. The only way to interact with the data contained in a collection is by using the functions below.\n\n    var aWeakMap = new WeakMap;\n    aWeakMap.set(this, { secrets: 'Dark Secrets' });\n    console.log(Object.getOwnPropertyNames(aWeakMap)); // []\n    for (var k in aWeakMap) { console.log(k); }         // nothing\n    console.log(aWeakMap.get(this));                    // { secrets: 'Dark Secrets' }\n\n\n# WeakMap\n\nWeakMaps require the use of objects as keys; primitives are not valid keys. Keys are per WeakMap are unique and setting the same key will overwrite the old value. WeakMaps provide for no method of iteration or listing the keys or values contained inside. Because WeakMaps expose no method of listing keys or values, and keys are required to be full-fledged objects with unique identities, the only way to extract a value from it is by having a direct reference to the object used as the key.\n\n* __set__ `weakmap.set(key, value)`. Key is any value including objects. Only non-primitives can be used as keys.\n* __get__ `weakmap.get(key)`. Returns the value that key corresponds to the key or undefined.\n* __has__ `weakmap.has(key)`. Returns boolean.\n* __delete__ `weakmap.delete(key)`. Removes value from the WeakMap if found. Returns true.\n\nWeakMaps allow for some interesting use cases like anonymous communication channels where neither side can identify the other, and no one else can eavesdrop. By using using a target object as its own key to retrieve a hidden seceret value no information about the origin can be obtained.\n\n*All non-primitives* are valid keys, including WeakMaps themselves.\n\n\n# Map\n\nMaps are much the same as WeakMaps but they can be iterated and thus their contents can be inspected. Many use cases have no requirement for anonymity or special garbage collection, but can benefit from using objects as keys and also not having the storage contained in the Map itself.\n\n* __set__ `map.set(key, value)`. Key is any value including objects. Primitives are valid keys but uniqueness is matched by their value since primitives don't have identity. Objects are matched by identity. Returns the value passed in.\n* __get__ `map.get(key)`. Returns the value that key corresponds to or undefined.\n* __has__ `map.has(key)`. Returns boolean.\n* __delete__ `map.delete(key)`. Removes value from the Map if found. Returns true.\n* __keys__ `map.keys()`. Returns array of contained keys.\n* __values__ `map.values()`. Return array of contained values.\n* __iterate__ `map.iterate(callback, context)`. Loop through the Map executing callback with the signature `callback.call(context || null, key, value, index)`.\n\n*All possible values* are valid keys, including undefined, null, and NaN.\n\n\n# Set\n\nSets are similar to arrays but enforce uniqueness of values. Adding the same value twice will only result in one being added to the set.\n\n* __add__ `set.add(value)`. Inserts a value of any type into the set if it's not already in the set.\n* __has__ `set.has(value)`. Returns boolean.\n* __delete__ `set.delete(value)`. Removes value from the Set if found. Returns true.\n* __values__ `set.values()`. Return array of contained values.\n* __iterate__ `set.iterate(callback, context)`. Loop through the Set executing callback with the signature `callback.call(context || null, value, index)`.\n\n\n# TODO\n\n* Check up on iteration semantics for ES6 as they stand now.","maintainers":[{"name":"benvie","email":"brandon@bbenvie.com"}]},"0.2.0":{"author":{"name":"Brandon Benvie","email":"brandon@bbenvie.com","url":"http://bbenvie.com"},"name":"harmony-collections","description":"Shim to provide Map, Set, and WeakMap if they're not available","keywords":["harmony","collection","weakmap","map","set","ecmascript","shim"],"version":"0.2.0","homepage":"https://github.com/Benvie/ES6-Harmony-Collections-Shim","repository":{"type":"git","url":"git://github.com/Benvie/ES6-Harmony-Collections-Shim.git"},"main":"harmony-collections.js","engines":{"node":"0.6"},"dependencies":{},"devDependencies":{},"_npmUser":{"name":"benvie","email":"brandon@bbenvie.com"},"_id":"harmony-collections@0.2.0","_engineSupported":false,"_npmVersion":"1.1.0-beta-4","_nodeVersion":"v0.7.0-pre","_defaultsLoaded":true,"dist":{"shasum":"fdde131fc82d20c23317298bb82cfbbc661ac4a4","tarball":"https://registry.npmjs.org/harmony-collections/-/harmony-collections-0.2.0.tgz","integrity":"sha512-+og99vaiTSNs+KIsFTw4VW0flUn9fft81lRdn/ePuAOLQ/M2gHRWCJQehtOXKlZr1fyBql+6TN8s2mLs7BdBjw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCETUeiL3ivN4kkeCHSvYPyYgpU4ZQ5gMr6LMH6Gl9o3wIgcLf9NpB9F2oEuhyU+4C0mDelfg/Qth5qcAFJpLQa0jg="}]},"readme":"# Harmony Collections Shim\n\nProvides Map, Set, and WeakMap with the same usage as the new ES6 native versions. Values in Harmony Collections are not contained in the collection instance itself, like array items and object properties, but in a private store. It's not possible to get access to or inspect the store directly.\n\nFor WeakMaps this means there's no way to find what's inside it or how many items are contained, and the only way to get a reference to a value is if you have a direct reference to the key object that links to it.\n\nWeakMap won't give the same garbage collector magic as the native one but it can be used with the same code.\n\n\n# Shim Usage\n\nThe function `attachIfMissing` is exported along with Map, WeakMap, and Set which will inspect the global object for the existence of Map, WeakMap, and Set in turn and add ones that are missing. Each one is checked separately because WeakMap's existence predates the other two so there's no guarantee which may already exist. If the global object is the window then `attach` is automatically executed.\n\n\n# Collections Usage\n\nMaps, WeakMaps, and Sets can each be created using their constructor with or without `new`. Examples:\n\n    var aWeakMap = new WeakMap;\n    var aMap = Map();\n    var aSet = new Set();\n\nItems in a collection do not appear in any manner through traditional inspection. The only way to interact with the data contained in a collection is by using the functions below.\n\n    var aWeakMap = new WeakMap;\n    aWeakMap.set(this, { secrets: 'Dark Secrets' });\n    console.log(Object.getOwnPropertyNames(aWeakMap)); // []\n    for (var k in aWeakMap) { console.log(k); }         // nothing\n    console.log(aWeakMap.get(this));                    // { secrets: 'Dark Secrets' }\n\n\n# WeakMap\n\nWeakMaps require the use of objects as keys; primitives are not valid keys. Keys are per WeakMap are unique and setting the same key will overwrite the old value. WeakMaps provide for no method of iteration or listing the keys or values contained inside. Because WeakMaps expose no method of listing keys or values, and keys are required to be full-fledged objects with unique identities, the only way to extract a value from it is by having a direct reference to the object used as the key.\n\n* __set__ `weakmap.set(key, value)`. Key is any value including objects. Only non-primitives can be used as keys.\n* __get__ `weakmap.get(key)`. Returns the value that key corresponds to the key or undefined.\n* __has__ `weakmap.has(key)`. Returns boolean.\n* __delete__ `weakmap.delete(key)`. Removes value from the WeakMap if found. Returns true.\n\nWeakMaps allow for some interesting use cases like anonymous communication channels where neither side can identify the other, and no one else can eavesdrop. By using using a target object as its own key to retrieve a hidden seceret value no information about the origin can be obtained.\n\n*All non-primitives* are valid keys, including WeakMaps themselves.\n\n\n# Map\n\nMaps are much the same as WeakMaps but they can be iterated and thus their contents can be inspected. Many use cases have no requirement for anonymity or special garbage collection, but can benefit from using objects as keys and also not having the storage contained in the Map itself.\n\n* __set__ `map.set(key, value)`. Key is any value including objects. Primitives are valid keys but uniqueness is matched by their value since primitives don't have identity. Objects are matched by identity. Returns the value passed in.\n* __get__ `map.get(key)`. Returns the value that key corresponds to or undefined.\n* __has__ `map.has(key)`. Returns boolean.\n* __delete__ `map.delete(key)`. Removes value from the Map if found. Returns true.\n* __keys__ `map.keys()`. Returns array of contained keys.\n* __values__ `map.values()`. Return array of contained values.\n* __iterate__ `map.iterate(callback, context)`. Loop through the Map executing callback with the signature `callback.call(context || null, key, value, index)`.\n\n*All possible values* are valid keys, including undefined, null, and NaN.\n\n\n# Set\n\nSets are similar to arrays but enforce uniqueness of values. Adding the same value twice will only result in one being added to the set.\n\n* __add__ `set.add(value)`. Inserts a value of any type into the set if it's not already in the set.\n* __has__ `set.has(value)`. Returns boolean.\n* __delete__ `set.delete(value)`. Removes value from the Set if found. Returns true.\n* __values__ `set.values()`. Return array of contained values.\n* __iterate__ `set.iterate(callback, context)`. Loop through the Set executing callback with the signature `callback.call(context || null, value, index)`.\n\n\n# TODO\n\n* Check up on iteration semantics for ES6 as they stand now.","maintainers":[{"name":"benvie","email":"brandon@bbenvie.com"}]},"0.2.1":{"author":{"name":"Brandon Benvie","email":"brandon@bbenvie.com","url":"http://bbenvie.com"},"name":"harmony-collections","description":"Shim to provide Map, Set, and WeakMap if they're not available","keywords":["harmony","collection","weakmap","map","set","ecmascript","shim"],"version":"0.2.1","homepage":"https://github.com/Benvie/ES6-Harmony-Collections-Shim","repository":{"type":"git","url":"git://github.com/Benvie/ES6-Harmony-Collections-Shim.git"},"main":"harmony-collections.js","engines":{"node":"0.6"},"dependencies":{},"devDependencies":{},"_npmUser":{"name":"benvie","email":"brandon@bbenvie.com"},"_id":"harmony-collections@0.2.1","optionalDependencies":{},"_engineSupported":false,"_npmVersion":"1.1.15","_nodeVersion":"v0.7.8","_defaultsLoaded":true,"dist":{"shasum":"d16bc516ec21f82f805944994c8bf22c8d5a8ea5","tarball":"https://registry.npmjs.org/harmony-collections/-/harmony-collections-0.2.1.tgz","integrity":"sha512-mA9JNMDjAcSUnJsFVfQgJvleR9iu777FuJgSKJMRIdu9RbirsjuafvkOLErubbDRhEcVJerHjOr9xKQ8S42OSQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG3SQcrEaWX++MKeJ40vqFLlDhaPluXcv7os4ZNyP1e5AiEAr6ekE/Q7DaGi8ybyca1qeW9oNGVGa+RD8X5g01nBm8I="}]},"readme":"# Harmony Collections Shim\n\nProvides Map, Set, and WeakMap with the same usage as the new ES6 native versions. Values in Harmony Collections are not contained in the collection instance itself, like array items and object properties, but in a private store. It's not possible to get access to or inspect the store directly.\n\nFor WeakMaps this means there's no way to find what's inside it or how many items are contained, and the only way to get a reference to a value is if you have a direct reference to the key object that links to it.\n\nWeakMap garbage collection functionality isn't quite to spec. Keys hold references to their values strongly which has the potential cause certain types of usage to disallow garbage collection of values in the group. However, even this is still better than any other gc scheme that can be implemented in JS.\n\n\n# Collections Usage\n\nMaps, WeakMaps, Hashes, and Sets can each be created using their constructor with or without `new`. Examples:\n\n    var aWeakMap = new WeakMap;\n    var aMap = Map();\n    var aSet = new Set();\n\nItems in a collection do not appear in any manner through traditional inspection. The only way to interact with the data contained in a collection is by using the functions below.\n\n    var aWeakMap = new WeakMap;\n    aWeakMap.set(this, { secrets: 'Dark Secrets' });\n    console.log(Object.getOwnPropertyNames(aWeakMap)); // []\n    for (var k in aWeakMap) { console.log(k); }         // nothing\n    console.log(aWeakMap.get(this));                    // { secrets: 'Dark Secrets' }\n\n\n# WeakMap\n\nWeakMaps require the use of objects as keys; primitives are not valid keys. Keys are per WeakMap are unique and setting the same key will overwrite the old value. WeakMaps provide for no method of iteration or listing the keys or values contained inside. Because WeakMaps expose no method of listing keys or values, and keys are required to be full-fledged objects with unique identities, the only way to extract a value from it is by having a direct reference to the object used as the key.\n\n* __set__ `weakmap.set(key, value)`. Key is any value including objects. Only non-primitives can be used as keys.\n* __get__ `weakmap.get(key)`. Returns the value that key corresponds to the key or undefined.\n* __has__ `weakmap.has(key)`. Returns boolean.\n* __delete__ `weakmap.delete(key)`. Removes value from the WeakMap if found. Returns true.\n\nWeakMaps allow for some interesting use cases like anonymous communication channels where neither side can identify the other, and no one else can eavesdrop. By using using a target object as its own key to retrieve a hidden seceret value no information about the origin can be obtained.\n\n__All non-primitives__ are valid keys, including WeakMaps themselves.\n\n\n# Map\n\nMaps are much the same as WeakMaps but they can be iterated and thus their contents can be inspected. Many use cases have no requirement for anonymity or special garbage collection, but can benefit from using objects as keys and also not having the storage contained in the Map itself.\n\n* __set__ `map.set(key, value)`. Key is any value including objects. Primitives are valid keys but uniqueness is matched by their value since primitives don't have identity. Objects are matched by identity. Returns the value passed in.\n* __get__ `map.get(key)`. Returns the value that key corresponds to or undefined.\n* __has__ `map.has(key)`. Returns boolean.\n* __delete__ `map.delete(key)`. Removes value from the Map if found. Returns true.\n* __keys__ `map.keys()`. Returns array of contained keys.\n* __values__ `map.values()`. Return array of contained values.\n* __iterate__ `map.iterate(callback, context)`. Loop through the Map executing callback with the signature `callback.call(context || null, key, value, index)`.\n\n__All possible values__ are valid keys, including undefined, null, and NaN.\n\n\n# Hash\n\nAs an added bonus, Hash is also exported. This has the same API as a Map except it only accepts primitive keys.\n\n* __set__ `map.set(key, value)`. Key is any value including objects. Primitives are valid keys but uniqueness is matched by their value since primitives don't have identity. Objects are matched by identity. Returns the value passed in.\n* __get__ `map.get(key)`. Returns the value that key corresponds to or undefined.\n* __has__ `map.has(key)`. Returns boolean.\n* __delete__ `map.delete(key)`. Removes value from the Map if found. Returns true.\n* __keys__ `map.keys()`. Returns array of contained keys.\n* __values__ `map.values()`. Return array of contained values.\n* __iterate__ `map.iterate(callback, context)`. Loop through the Map executing callback with the signature `callback.call(context || null, key, value, index)`.\n\n__Primitives__ are valid keys, specifically numbers and strings. All input values are coerced to strings so you can give it any value, but they will be converted to string keys.\n\n\n# Set\n\nSets are similar to arrays but enforce uniqueness of values. Adding the same value twice will only result in one being added to the set.\n\n* __add__ `set.add(value)`. Inserts a value of any type into the set if it's not already in the set.\n* __has__ `set.has(value)`. Returns boolean.\n* __delete__ `set.delete(value)`. Removes value from the Set if found. Returns true.\n* __values__ `set.values()`. Return array of contained values.\n* __iterate__ `set.iterate(callback, context)`. Loop through the Set executing callback with the signature `callback.call(context || null, value, index)`.","maintainers":[{"name":"benvie","email":"brandon@bbenvie.com"}]},"0.2.2":{"author":{"name":"Brandon Benvie","email":"brandon@bbenvie.com","url":"http://bbenvie.com"},"name":"harmony-collections","description":"Shim to provide Map, Set, and WeakMap if they're not available","keywords":["harmony","collection","weakmap","map","set","ecmascript","shim"],"version":"0.2.2","homepage":"https://github.com/Benvie/ES6-Harmony-Collections-Shim","repository":{"type":"git","url":"git://github.com/Benvie/ES6-Harmony-Collections-Shim.git"},"main":"harmony-collections.js","engines":{"node":"0.6"},"dependencies":{},"devDependencies":{},"_npmUser":{"name":"benvie","email":"brandon@bbenvie.com"},"_id":"harmony-collections@0.2.2","optionalDependencies":{},"_engineSupported":false,"_npmVersion":"1.1.15","_nodeVersion":"v0.7.8","_defaultsLoaded":true,"dist":{"shasum":"9914c9d564e1a121fce6731257f71522f3954f8b","tarball":"https://registry.npmjs.org/harmony-collections/-/harmony-collections-0.2.2.tgz","integrity":"sha512-d2pYP8UhY/KkXWOmJQ2KIPt7u2KoaaPNok6Eu8qZ5Xj7EfupL2+Psm7VZ68zdydn1jXLJeNY9OW1Natvzt/BXg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCcJWyn8nvUkHXC6neneJLKhFLXaFER/JBoaBsdCnwm5wIgVCOkuwr/eVOc3CjeXyi1khqwr7nqzkQxYpoNoRxMMOM="}]},"readme":"# Harmony Collections Shim\n\nProvides Map, Set, and WeakMap with the same usage as the new ES6 native versions. Values in Harmony Collections are not contained in the collection instance itself, like array items and object properties, but in a private store. It's not possible to get access to or inspect the store directly.\n\nFor WeakMaps this means there's no way to find what's inside it or how many items are contained, and the only way to get a reference to a value is if you have a direct reference to the key object that links to it.\n\nWeakMap garbage collection functionality isn't quite to spec. Keys hold references to their values strongly which has the potential cause certain types of usage to disallow garbage collection of values in the group. However, even this is still better than any other gc scheme that can be implemented in JS.\n\n\n# Collections Usage\n\nMaps, WeakMaps, Hashes, and Sets can each be created using their constructor with or without `new`. Examples:\n\n    var aWeakMap = new WeakMap;\n    var aMap = Map();\n    var aSet = new Set();\n\nItems in a collection do not appear in any manner through traditional inspection. The only way to interact with the data contained in a collection is by using the functions below.\n\n    var aWeakMap = new WeakMap;\n    aWeakMap.set(this, { secrets: 'Dark Secrets' });\n    console.log(Object.getOwnPropertyNames(aWeakMap)); // []\n    for (var k in aWeakMap) { console.log(k); }         // nothing\n    console.log(aWeakMap.get(this));                    // { secrets: 'Dark Secrets' }\n\n\n# WeakMap\n\nWeakMaps require the use of objects as keys; primitives are not valid keys. Keys are per WeakMap are unique and setting the same key will overwrite the old value. WeakMaps provide for no method of iteration or listing the keys or values contained inside. Because WeakMaps expose no method of listing keys or values, and keys are required to be full-fledged objects with unique identities, the only way to extract a value from it is by having a direct reference to the object used as the key.\n\n* __set__ `weakmap.set(key, value)`. Key is any value including objects. Only non-primitives can be used as keys.\n* __get__ `weakmap.get(key)`. Returns the value that key corresponds to the key or undefined.\n* __has__ `weakmap.has(key)`. Returns boolean.\n* __delete__ `weakmap.delete(key)`. Removes value from the WeakMap if found. Returns true.\n\nWeakMaps allow for some interesting use cases like anonymous communication channels where neither side can identify the other, and no one else can eavesdrop. By using using a target object as its own key to retrieve a hidden seceret value no information about the origin can be obtained.\n\n__All non-primitives__ are valid keys, including WeakMaps themselves.\n\n\n# Map\n\nMaps are much the same as WeakMaps but they can be iterated and thus their contents can be inspected. Many use cases have no requirement for anonymity or special garbage collection, but can benefit from using objects as keys and also not having the storage contained in the Map itself.\n\n* __set__ `map.set(key, value)`. Key is any value including objects. Primitives are valid keys but uniqueness is matched by their value since primitives don't have identity. Objects are matched by identity. Returns the value passed in.\n* __get__ `map.get(key)`. Returns the value that key corresponds to or undefined.\n* __has__ `map.has(key)`. Returns boolean.\n* __delete__ `map.delete(key)`. Removes value from the Map if found. Returns true.\n* __keys__ `map.keys()`. Returns array of contained keys.\n* __values__ `map.values()`. Return array of contained values.\n* __iterate__ `map.iterate(callback, context)`. Loop through the Map executing callback with the signature `callback.call(context || null, key, value, index)`.\n\n__All possible values__ are valid keys, including undefined, null, and NaN.\n\n\n# Hash\n\nAs an added bonus, Hash is also exported. This has the same API as a Map except it only accepts primitive keys.\n\n* __set__ `map.set(key, value)`. Key is any value including objects. Primitives are valid keys but uniqueness is matched by their value since primitives don't have identity. Objects are matched by identity. Returns the value passed in.\n* __get__ `map.get(key)`. Returns the value that key corresponds to or undefined.\n* __has__ `map.has(key)`. Returns boolean.\n* __delete__ `map.delete(key)`. Removes value from the Map if found. Returns true.\n* __keys__ `map.keys()`. Returns array of contained keys.\n* __values__ `map.values()`. Return array of contained values.\n* __iterate__ `map.iterate(callback, context)`. Loop through the Map executing callback with the signature `callback.call(context || null, key, value, index)`.\n\n__Primitives__ are valid keys, specifically numbers and strings. All input values are coerced to strings so you can give it any value, but they will be converted to string keys.\n\n\n# Set\n\nSets are similar to arrays but enforce uniqueness of values. Adding the same value twice will only result in one being added to the set.\n\n* __add__ `set.add(value)`. Inserts a value of any type into the set if it's not already in the set.\n* __has__ `set.has(value)`. Returns boolean.\n* __delete__ `set.delete(value)`. Removes value from the Set if found. Returns true.\n* __values__ `set.values()`. Return array of contained values.\n* __iterate__ `set.iterate(callback, context)`. Loop through the Set executing callback with the signature `callback.call(context || null, value, index)`.","maintainers":[{"name":"benvie","email":"brandon@bbenvie.com"}]},"0.2.3":{"author":{"name":"Brandon Benvie","email":"brandon@bbenvie.com","url":"http://bbenvie.com"},"name":"harmony-collections","description":"Shim to provide Map, Set, and WeakMap if they're not available","keywords":["harmony","collection","weakmap","map","set","ecmascript","shim"],"version":"0.2.3","homepage":"https://github.com/Benvie/ES6-Harmony-Collections-Shim","repository":{"type":"git","url":"git://github.com/Benvie/ES6-Harmony-Collections-Shim.git"},"main":"harmony-collections.js","engines":{"node":"0.6"},"dependencies":{},"devDependencies":{},"_npmUser":{"name":"benvie","email":"brandon@bbenvie.com"},"_id":"harmony-collections@0.2.3","optionalDependencies":{},"_engineSupported":false,"_npmVersion":"1.1.15","_nodeVersion":"v0.7.8","_defaultsLoaded":true,"dist":{"shasum":"2ca1c2cddd46b39c8bdc01ad8f706e4ad89ecf2c","tarball":"https://registry.npmjs.org/harmony-collections/-/harmony-collections-0.2.3.tgz","integrity":"sha512-ogl2sBr594Np5tCXZblThBJe2S+ri1RM0IKKNMJ50aJWKwYpQQo8QR5i36y6o+c3Ts5SnF1PHmahCBMY0aRwcQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBFvA0Zkb2pGPsWvh1gEpTlDasva7O0WNcOVjoKbdaqNAiEA8jwq8c1FI/gJtpU5jCiGyLHnEsz8cG7iTKN4g0ugzaU="}]},"readme":"# Harmony Collections Shim\n\nProvides Map, Set, and WeakMap with the same usage as the new ES6 native versions. Values in Harmony Collections are not contained in the collection instance itself, like array items and object properties, but in a private store. It's not possible to get access to or inspect the store directly.\n\nFor WeakMaps this means there's no way to find what's inside it or how many items are contained, and the only way to get a reference to a value is if you have a direct reference to the key object that links to it.\n\nWeakMap garbage collection functionality isn't quite to spec. Keys hold references to their values strongly which has the potential cause certain types of usage to disallow garbage collection of values in the group. However, even this is still better than any other gc scheme that can be implemented in JS.\n\n\n# Collections Usage\n\nMaps, WeakMaps, Hashes, and Sets can each be created using their constructor with or without `new`. Examples:\n\n    var aWeakMap = new WeakMap;\n    var aMap = Map();\n    var aSet = new Set();\n\nItems in a collection do not appear in any manner through traditional inspection. The only way to interact with the data contained in a collection is by using the functions below.\n\n    var aWeakMap = new WeakMap;\n    aWeakMap.set(this, { secrets: 'Dark Secrets' });\n    console.log(Object.getOwnPropertyNames(aWeakMap)); // []\n    for (var k in aWeakMap) { console.log(k); }         // nothing\n    console.log(aWeakMap.get(this));                    // { secrets: 'Dark Secrets' }\n\n\n# WeakMap\n\nWeakMaps require the use of objects as keys; primitives are not valid keys. Keys are per WeakMap are unique and setting the same key will overwrite the old value. WeakMaps provide for no method of iteration or listing the keys or values contained inside. Because WeakMaps expose no method of listing keys or values, and keys are required to be full-fledged objects with unique identities, the only way to extract a value from it is by having a direct reference to the object used as the key.\n\n* __set__ `weakmap.set(key, value)`. Key is any value including objects. Only non-primitives can be used as keys.\n* __get__ `weakmap.get(key)`. Returns the value that key corresponds to the key or undefined.\n* __has__ `weakmap.has(key)`. Returns boolean.\n* __delete__ `weakmap.delete(key)`. Removes value from the WeakMap if found. Returns true.\n\nWeakMaps allow for some interesting use cases like anonymous communication channels where neither side can identify the other, and no one else can eavesdrop. By using using a target object as its own key to retrieve a hidden seceret value no information about the origin can be obtained.\n\n__All non-primitives__ are valid keys, including WeakMaps themselves.\n\n\n# Map\n\nMaps are much the same as WeakMaps but they can be iterated and thus their contents can be inspected. Many use cases have no requirement for anonymity or special garbage collection, but can benefit from using objects as keys and also not having the storage contained in the Map itself.\n\n* __set__ `map.set(key, value)`. Key is any value including objects. Primitives are valid keys but uniqueness is matched by their value since primitives don't have identity. Objects are matched by identity. Returns the value passed in.\n* __get__ `map.get(key)`. Returns the value that key corresponds to or undefined.\n* __has__ `map.has(key)`. Returns boolean.\n* __delete__ `map.delete(key)`. Removes value from the Map if found. Returns true.\n* __keys__ `map.keys()`. Returns array of contained keys.\n* __values__ `map.values()`. Return array of contained values.\n* __iterate__ `map.iterate(callback, context)`. Loop through the Map executing callback with the signature `callback.call(context || null, key, value, index)`.\n\n__All possible values__ are valid keys, including undefined, null, and NaN.\n\n\n# Hash\n\nAs an added bonus, Hash is also exported. This has the same API as a Map except it only accepts primitive keys.\n\n* __set__ `map.set(key, value)`. Key is any value including objects. Primitives are valid keys but uniqueness is matched by their value since primitives don't have identity. Objects are matched by identity. Returns the value passed in.\n* __get__ `map.get(key)`. Returns the value that key corresponds to or undefined.\n* __has__ `map.has(key)`. Returns boolean.\n* __delete__ `map.delete(key)`. Removes value from the Map if found. Returns true.\n* __keys__ `map.keys()`. Returns array of contained keys.\n* __values__ `map.values()`. Return array of contained values.\n* __iterate__ `map.iterate(callback, context)`. Loop through the Map executing callback with the signature `callback.call(context || null, key, value, index)`.\n\n__Primitives__ are valid keys, specifically numbers and strings. All input values are coerced to strings so you can give it any value, but they will be converted to string keys.\n\n\n# Set\n\nSets are similar to arrays but enforce uniqueness of values. Adding the same value twice will only result in one being added to the set.\n\n* __add__ `set.add(value)`. Inserts a value of any type into the set if it's not already in the set.\n* __has__ `set.has(value)`. Returns boolean.\n* __delete__ `set.delete(value)`. Removes value from the Set if found. Returns true.\n* __values__ `set.values()`. Return array of contained values.\n* __iterate__ `set.iterate(callback, context)`. Loop through the Set executing callback with the signature `callback.call(context || null, value, index)`.","maintainers":[{"name":"benvie","email":"brandon@bbenvie.com"}]},"0.2.4":{"author":{"name":"Brandon Benvie","email":"brandon@bbenvie.com","url":"http://bbenvie.com"},"name":"harmony-collections","description":"Shim to provide Map, Set, and WeakMap if they're not available","keywords":["harmony","collection","weakmap","map","set","ecmascript","shim"],"version":"0.2.4","homepage":"https://github.com/Benvie/ES6-Harmony-Collections-Shim","repository":{"type":"git","url":"git://github.com/Benvie/ES6-Harmony-Collections-Shim.git"},"main":"harmony-collections.js","engines":{"node":"0.6"},"dependencies":{},"devDependencies":{},"_npmUser":{"name":"benvie","email":"brandon@bbenvie.com"},"_id":"harmony-collections@0.2.4","optionalDependencies":{},"_engineSupported":false,"_npmVersion":"1.1.15","_nodeVersion":"v0.7.8","_defaultsLoaded":true,"dist":{"shasum":"0574965d15a3557a5b3c421a4d9b13a7a2a2a6b3","tarball":"https://registry.npmjs.org/harmony-collections/-/harmony-collections-0.2.4.tgz","integrity":"sha512-lTJKMstBbC8lgGhxiVGIxX9L0HQ3A35YxKRRFk6CUZ8FAhooXIzmh0lGdBc6THH4yxNkBppOSYyaQMbrgnAqpw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDS3B/oT8SxeRYtvtYzyoh3WTlJHYKYY+b0rkos/33TLAiBdPzmgC/kDVxRI0XQEOsxpoGO138D/x9F3Y5CsldUpoQ=="}]},"readme":"# Harmony Collections Shim\n\nProvides Map, Set, and WeakMap with the same usage as the new ES6 native versions. Values in Harmony Collections are not contained in the collection instance itself, like array items and object properties, but in a private store. It's not possible to get access to or inspect the store directly.\n\nFor WeakMaps this means there's no way to find what's inside it or how many items are contained, and the only way to get a reference to a value is if you have a direct reference to the key object that links to it.\n\nWeakMap garbage collection functionality isn't quite to spec. Keys hold references to their values strongly which has the potential cause certain types of usage to disallow garbage collection of values in the group. However, even this is still better than any other gc scheme that can be implemented in JS.\n\n\n# Collections Usage\n\nMaps, WeakMaps, Hashes, and Sets can each be created using their constructor with or without `new`. Examples:\n\n    var aWeakMap = new WeakMap;\n    var aMap = Map();\n    var aSet = new Set();\n\nItems in a collection do not appear in any manner through traditional inspection. The only way to interact with the data contained in a collection is by using the functions below.\n\n    var aWeakMap = new WeakMap;\n    aWeakMap.set(this, { secrets: 'Dark Secrets' });\n    console.log(Object.getOwnPropertyNames(aWeakMap)); // []\n    for (var k in aWeakMap) { console.log(k); }         // nothing\n    console.log(aWeakMap.get(this));                    // { secrets: 'Dark Secrets' }\n\n\n# WeakMap\n\nWeakMaps require the use of objects as keys; primitives are not valid keys. Keys are per WeakMap are unique and setting the same key will overwrite the old value. WeakMaps provide for no method of iteration or listing the keys or values contained inside. Because WeakMaps expose no method of listing keys or values, and keys are required to be full-fledged objects with unique identities, the only way to extract a value from it is by having a direct reference to the object used as the key.\n\n* __set__ `weakmap.set(key, value)`. Key is any value including objects. Only non-primitives can be used as keys.\n* __get__ `weakmap.get(key)`. Returns the value that key corresponds to the key or undefined.\n* __has__ `weakmap.has(key)`. Returns boolean.\n* __delete__ `weakmap.delete(key)`. Removes value from the WeakMap if found. Returns true.\n\nWeakMaps allow for some interesting use cases like anonymous communication channels where neither side can identify the other, and no one else can eavesdrop. By using using a target object as its own key to retrieve a hidden seceret value no information about the origin can be obtained.\n\n__All non-primitives__ are valid keys, including WeakMaps themselves.\n\n\n# Map\n\nMaps are much the same as WeakMaps but they can be iterated and thus their contents can be inspected. Many use cases have no requirement for anonymity or special garbage collection, but can benefit from using objects as keys and also not having the storage contained in the Map itself.\n\n* __set__ `map.set(key, value)`. Key is any value including objects. Primitives are valid keys but uniqueness is matched by their value since primitives don't have identity. Objects are matched by identity. Returns the value passed in.\n* __get__ `map.get(key)`. Returns the value that key corresponds to or undefined.\n* __has__ `map.has(key)`. Returns boolean.\n* __delete__ `map.delete(key)`. Removes value from the Map if found. Returns true.\n* __keys__ `map.keys()`. Returns array of contained keys.\n* __values__ `map.values()`. Return array of contained values.\n* __iterate__ `map.iterate(callback, context)`. Loop through the Map executing callback with the signature `callback.call(context || global, value, key)`.\n* __toArray__ `map.toArray()`. Return array of Pair objects of the form `{ key: KEY, value: VALUE }`.\n\n__All possible values__ are valid keys, including undefined, null, and NaN.\n\n\n# Hash\n\nAs an added bonus, Hash is also exported. This has the same API as a Map except it only accepts primitive keys.\n\n* __set__ `hash.set(key, value)`. Key is any value including objects. Primitives are valid keys but uniqueness is matched by their value since primitives don't have identity. Objects are matched by identity. Returns the value passed in.\n* __get__ `hash.get(key)`. Returns the value that key corresponds to or undefined.\n* __has__ `hash.has(key)`. Returns boolean.\n* __delete__ `hash.delete(key)`. Removes value from the Map if found. Returns true.\n* __keys__ `hash.keys()`. Returns array of contained keys.\n* __values__ `hash.values()`. Return array of contained values.\n* __iterate__ `hash.iterate(callback, context)`. Loop through the Map executing callback with the signature `callback.call(context || global, value, key)`.\n* __toArray__ `hash.values()`. Return array of Pair objects of the form `{ key: KEY, value: VALUE }`.\n* __toObject__ `hash.toArray()`. Returns a plain object with the keys and values.\n\n__Primitives__ are valid keys, specifically numbers and strings. All input values are coerced to strings so you can give it any value, but they will be converted to string keys.\n\n\n# Set\n\nSets are similar to arrays but enforce uniqueness of values. Adding the same value twice will only result in one being added to the set.\n\n* __add__ `set.add(value)`. Inserts a value of any type into the set if it's not already in the set.\n* __has__ `set.has(value)`. Returns boolean.\n* __delete__ `set.delete(value)`. Removes value from the Set if found. Returns true.\n* __values__ `set.values()`. Return array of contained values.\n* __iterate__ `set.iterate(callback, context)`. Loop through the Set executing callback with the signature `callback.call(context || global, value, index)`.","maintainers":[{"name":"benvie","email":"brandon@bbenvie.com"}]},"0.2.5":{"author":{"name":"Brandon Benvie","email":"brandon@bbenvie.com","url":"http://bbenvie.com"},"name":"harmony-collections","description":"Shim to provide Map, Set, and WeakMap if they're not available, with non-leaky O(1) lookup WeakMaps","keywords":["harmony","collection","weakmap","map","set","ecmascript","shim","garbage collection"],"version":"0.2.5","homepage":"https://github.com/Benvie/ES6-Harmony-Collections-Shim","repository":{"type":"git","url":"git://github.com/Benvie/ES6-Harmony-Collections-Shim.git"},"main":"harmony-collections.js","engines":{"node":"0.6"},"dependencies":{},"devDependencies":{"tap":"*"},"_npmUser":{"name":"benvie","email":"brandon@bbenvie.com"},"_id":"harmony-collections@0.2.5","optionalDependencies":{},"_engineSupported":false,"_npmVersion":"1.1.18","_nodeVersion":"v0.7.8","_defaultsLoaded":true,"dist":{"shasum":"45e16715db25a8aeaf9feb58ccdc242210a92adb","tarball":"https://registry.npmjs.org/harmony-collections/-/harmony-collections-0.2.5.tgz","integrity":"sha512-ms4m8RYlepfzLbaAHORNc6r7sibfFiMPwgkMm3/RQvVaI+XVj6bgjhLLBB5JfgTNSC5b2zTz0n7U5m514sVz6Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAtnoSP9p/lWUemYU61CEU87GLz9gi/mRABmxQ2/3MhfAiBw0kJvrjSldA5UB6WswYl5EafeV55/q4thYe30D+Od/g=="}]},"readme":"# Harmony Collections Shim\n\nProvides Map, Set, and WeakMap with the same usage as the new ES6 native versions. Values in Harmony Collections are not contained in the collection instance itself, like array items and object properties, but in a private store. It's not possible to get access to or inspect the store directly.\n\nFor WeakMaps this means there's no way to find what's inside it or how many items are contained, and the only way to get a reference to a value is if you have a direct reference to the key object that links to it.\n\nWeakMap garbage collection functionality isn't quite to spec. Keys hold references to their values strongly which has the potential cause certain types of usage to disallow garbage collection of values in the group. However, even this is still better than any other gc scheme that can be implemented in JS.\n\n\n# Collections Usage\n\nMaps, WeakMaps, Hashes, and Sets can each be created using their constructor with or without `new`. Examples:\n\n    var aWeakMap = new WeakMap;\n    var aMap = Map();\n    var aSet = new Set();\n\nItems in a collection do not appear in any manner through traditional inspection. The only way to interact with the data contained in a collection is by using the functions below.\n\n    var aWeakMap = new WeakMap;\n    aWeakMap.set(this, { secrets: 'Dark Secrets' });\n    console.log(Object.getOwnPropertyNames(aWeakMap)); // []\n    for (var k in aWeakMap) { console.log(k); }         // nothing\n    console.log(aWeakMap.get(this));                    // { secrets: 'Dark Secrets' }\n\n\n# WeakMap\n\nWeakMaps require the use of objects as keys; primitives are not valid keys. Keys are per WeakMap are unique and setting the same key will overwrite the old value. WeakMaps provide for no method of iteration or listing the keys or values contained inside. Because WeakMaps expose no method of listing keys or values, and keys are required to be full-fledged objects with unique identities, the only way to extract a value from it is by having a direct reference to the object used as the key.\n\n* __set__ `weakmap.set(key, value)`. Key is any value including objects. Only non-primitives can be used as keys.\n* __get__ `weakmap.get(key)`. Returns the value that key corresponds to the key or undefined.\n* __has__ `weakmap.has(key)`. Returns boolean.\n* __delete__ `weakmap.delete(key)`. Removes value from the WeakMap if found. Returns true.\n\nWeakMaps allow for some interesting use cases like anonymous communication channels where neither side can identify the other, and no one else can eavesdrop. By using using a target object as its own key to retrieve a hidden seceret value no information about the origin can be obtained.\n\n__All non-primitives__ are valid keys, including WeakMaps themselves.\n\n\n# Map\n\nMaps are much the same as WeakMaps but they can be iterated and thus their contents can be inspected. Many use cases have no requirement for anonymity or special garbage collection, but can benefit from using objects as keys and also not having the storage contained in the Map itself.\n\n* __set__ `map.set(key, value)`. Key is any value including objects. Primitives are valid keys but uniqueness is matched by their value since primitives don't have identity. Objects are matched by identity. Returns the value passed in.\n* __get__ `map.get(key)`. Returns the value that key corresponds to or undefined.\n* __has__ `map.has(key)`. Returns boolean.\n* __delete__ `map.delete(key)`. Removes value from the Map if found. Returns true.\n* __keys__ `map.keys()`. Returns array of contained keys.\n* __values__ `map.values()`. Return array of contained values.\n* __iterate__ `map.iterate(callback, context)`. Loop through the Map executing callback with the signature `callback.call(context || global, value, key)`.\n* __toArray__ `map.toArray()`. Return array of Pair objects of the form `{ key: KEY, value: VALUE }`.\n\n__All possible values__ are valid keys, including undefined, null, and NaN.\n\n\n# Hash\n\nAs an added bonus, Hash is also exported. This has the same API as a Map except it only accepts primitive keys.\n\n* __set__ `hash.set(key, value)`. Key is any value including objects. Primitives are valid keys but uniqueness is matched by their value since primitives don't have identity. Objects are matched by identity. Returns the value passed in.\n* __get__ `hash.get(key)`. Returns the value that key corresponds to or undefined.\n* __has__ `hash.has(key)`. Returns boolean.\n* __delete__ `hash.delete(key)`. Removes value from the Map if found. Returns true.\n* __keys__ `hash.keys()`. Returns array of contained keys.\n* __values__ `hash.values()`. Return array of contained values.\n* __iterate__ `hash.iterate(callback, context)`. Loop through the Map executing callback with the signature `callback.call(context || global, value, key)`.\n* __toArray__ `hash.values()`. Return array of Pair objects of the form `{ key: KEY, value: VALUE }`.\n* __toObject__ `hash.toArray()`. Returns a plain object with the keys and values.\n\n__Primitives__ are valid keys, specifically numbers and strings. All input values are coerced to strings so you can give it any value, but they will be converted to string keys.\n\n\n# Set\n\nSets are similar to arrays but enforce uniqueness of values. Adding the same value twice will only result in one being added to the set.\n\n* __add__ `set.add(value)`. Inserts a value of any type into the set if it's not already in the set.\n* __has__ `set.has(value)`. Returns boolean.\n* __delete__ `set.delete(value)`. Removes value from the Set if found. Returns true.\n* __values__ `set.values()`. Return array of contained values.\n* __iterate__ `set.iterate(callback, context)`. Loop through the Set executing callback with the signature `callback.call(context || global, value, index)`.","maintainers":[{"name":"benvie","email":"brandon@bbenvie.com"}]},"0.2.6":{"author":{"name":"Brandon Benvie","email":"brandon@bbenvie.com","url":"http://bbenvie.com"},"name":"harmony-collections","description":"Shim to provide Map, Set, and WeakMap if they're not available, with non-leaky O(1) lookup WeakMaps","keywords":["harmony","collection","weakmap","map","set","ecmascript","shim","garbage collection"],"version":"0.2.6","homepage":"https://github.com/Benvie/ES6-Harmony-Collections-Shim","repository":{"type":"git","url":"git://github.com/Benvie/ES6-Harmony-Collections-Shim.git"},"main":"harmony-collections.js","engines":{"node":"0.6"},"dependencies":{},"devDependencies":{"tap":"*"},"_npmUser":{"name":"benvie","email":"brandon@bbenvie.com"},"_id":"harmony-collections@0.2.6","optionalDependencies":{},"_engineSupported":false,"_npmVersion":"1.1.18","_nodeVersion":"v0.7.8","_defaultsLoaded":true,"dist":{"shasum":"1a9e4b96ee496dd5f5d0e2395bf21915f6d29831","tarball":"https://registry.npmjs.org/harmony-collections/-/harmony-collections-0.2.6.tgz","integrity":"sha512-jCbkwtfux+XXV7+yC+5kXuO2+TOEy144H3VgJB7RSI7iwJIPv4cIrZUryonu37MOn9993/fHubXFjLLWu5CRUw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCh9AMDZ9b74P1nEmzY3qzttOZpx95BY6MQE8JQWX06nAIgIhQGYPdfNikNm+FayHeu4XT6NznS4uD5W8DDMAMgpIo="}]},"readme":"# Harmony Collections Shim\n\nProvides Map, Set, and WeakMap with the same usage as the new ES6 native versions. Values in Harmony Collections are not contained in the collection instance itself, like array items and object properties, but in a private store. It's not possible to get access to or inspect the store directly.\n\nFor WeakMaps this means there's no way to find what's inside it or how many items are contained, and the only way to get a reference to a value is if you have a direct reference to the key object that links to it.\n\n# Compatability\n\nWorks with IE9+, Chrome, Firefox, Safari, untested in Opera.\n\n# Collections Usage\n\nMaps, WeakMaps, Hashes, and Sets can each be created using their constructor with or without `new`. Examples:\n\n    var aWeakMap = new WeakMap;\n    var aMap = Map();\n    var aSet = new Set();\n\nItems in a collection do not appear in any manner through traditional inspection. The only way to interact with the data contained in a collection is by using the functions below.\n\n    var aWeakMap = new WeakMap;\n    aWeakMap.set(this, { secrets: 'Dark Secrets' });\n    console.log(Object.getOwnPropertyNames(aWeakMap)); // []\n    for (var k in aWeakMap) { console.log(k); }         // nothing\n    console.log(aWeakMap.get(this));                    // { secrets: 'Dark Secrets' }\n\n\n# WeakMap\n\nWeakMaps require the use of objects as keys; primitives are not valid keys. Keys are per WeakMap are unique and setting the same key will overwrite the old value. WeakMaps provide for no method of iteration or listing the keys or values contained inside. Because WeakMaps expose no method of listing keys or values, and keys are required to be full-fledged objects with unique identities, the only way to extract a value from it is by having a direct reference to the object used as the key.\n\n* __set__ `weakmap.set(key, value)`. Key is any value including objects. Only non-primitives can be used as keys.\n* __get__ `weakmap.get(key)`. Returns the value that key corresponds to the key or undefined.\n* __has__ `weakmap.has(key)`. Returns boolean.\n* __delete__ `weakmap.delete(key)`. Removes value from the WeakMap if found. Returns true.\n\nWeakMaps allow for some interesting use cases like anonymous communication channels where neither side can identify the other, and no one else can eavesdrop. By using using a target object as its own key to retrieve a hidden seceret value no information about the origin can be obtained.\n\n__All non-primitives__ are valid keys, including WeakMaps themselves.\n\n\n# Map\n\nMaps are much the same as WeakMaps but they can be iterated and thus their contents can be inspected. Many use cases have no requirement for anonymity or special garbage collection, but can benefit from using objects as keys and also not having the storage contained in the Map itself.\n\n* __set__ `map.set(key, value)`. Key is any value including objects. Primitives are valid keys but uniqueness is matched by their value since primitives don't have identity. Objects are matched by identity. Returns the value passed in.\n* __get__ `map.get(key)`. Returns the value that key corresponds to or undefined.\n* __has__ `map.has(key)`. Returns boolean.\n* __delete__ `map.delete(key)`. Removes value from the Map if found. Returns true.\n* __keys__ `map.keys()`. Returns array of contained keys.\n* __values__ `map.values()`. Return array of contained values.\n* __iterate__ `map.iterate(callback, context)`. Loop through the Map executing callback with the signature `callback.call(context || global, value, key)`.\n* __toArray__ `map.toArray()`. Return array of Pair objects of the form `{ key: KEY, value: VALUE }`.\n\n__All possible values__ are valid keys, including undefined, null, and NaN.\n\n\n# Hash\n\nAs an added bonus, Hash is also exported. This has the same API as a Map except it only accepts primitive keys.\n\n* __set__ `hash.set(key, value)`. Key is any value including objects. Primitives are valid keys but uniqueness is matched by their value since primitives don't have identity. Objects are matched by identity. Returns the value passed in.\n* __get__ `hash.get(key)`. Returns the value that key corresponds to or undefined.\n* __has__ `hash.has(key)`. Returns boolean.\n* __delete__ `hash.delete(key)`. Removes value from the Map if found. Returns true.\n* __keys__ `hash.keys()`. Returns array of contained keys.\n* __values__ `hash.values()`. Return array of contained values.\n* __iterate__ `hash.iterate(callback, context)`. Loop through the Map executing callback with the signature `callback.call(context || global, value, key)`.\n* __toArray__ `hash.values()`. Return array of Pair objects of the form `{ key: KEY, value: VALUE }`.\n* __toObject__ `hash.toArray()`. Returns a plain object with the keys and values.\n\n__Primitives__ are valid keys, specifically numbers and strings. All input values are coerced to strings so you can give it any value, but they will be converted to string keys.\n\n\n# Set\n\nSets are similar to arrays but enforce uniqueness of values. Adding the same value twice will only result in one being added to the set.\n\n* __add__ `set.add(value)`. Inserts a value of any type into the set if it's not already in the set.\n* __has__ `set.has(value)`. Returns boolean.\n* __delete__ `set.delete(value)`. Removes value from the Set if found. Returns true.\n* __values__ `set.values()`. Return array of contained values.\n* __iterate__ `set.iterate(callback, context)`. Loop through the Set executing callback with the signature `callback.call(context || global, value, index)`.","maintainers":[{"name":"benvie","email":"brandon@bbenvie.com"}]},"0.2.9":{"author":{"name":"Brandon Benvie","email":"brandon@bbenvie.com","url":"http://bbenvie.com"},"name":"harmony-collections","description":"Provides Map, Set, and WeakMap with the same usage as the new ES6 native versions. Values in Harmony Collections are not contained in the collection instance itself, like array items and object properties, but in a private store. It's not possible to get access to or inspect the store directly.","keywords":["harmony","collection","weakmap","map","set","ecmascript","shim","garbage collection"],"version":"0.2.9","homepage":"https://github.com/Benvie/ES6-Harmony-Collections-Shim","repository":{"type":"git","url":"https://github.com/Benvie/ES6-Harmony-Collections-Shim"},"main":"harmony-collections.js","engines":{"node":"0.6"},"dependencies":{},"devDependencies":{"tap":"*"},"readme":"# Harmony Collections Shim\n\nProvides Map, Set, and WeakMap with the same usage as the new ES6 native versions. Values in Harmony Collections are not contained in the collection instance itself, like array items and object properties, but in a private store. It's not possible to get access to or inspect the store directly.\n\nFor WeakMaps this means there's no way to find what's inside it or how many items are contained, and the only way to get a reference to a value is if you have a direct reference to the key object that links to it.\n\n# Compatability\n\nWorks with IE9+, Chrome, Firefox, Safari, untested in Opera.\n\n# Collections Usage\n\nMaps, WeakMaps, Hashes, and Sets can each be created using their constructor with or without `new`. Examples:\n\n    var aWeakMap = new WeakMap;\n    var aMap = Map();\n    var aSet = new Set();\n\nItems in a collection do not appear in any manner through traditional inspection. The only way to interact with the data contained in a collection is by using the functions below.\n\n    var aWeakMap = new WeakMap;\n    aWeakMap.set(this, { secrets: 'Dark Secrets' });\n    console.log(Object.getOwnPropertyNames(aWeakMap)); // []\n    for (var k in aWeakMap) { console.log(k); }         // nothing\n    console.log(aWeakMap.get(this));                    // { secrets: 'Dark Secrets' }\n\n\n# WeakMap\n\nWeakMaps require the use of objects as keys; primitives are not valid keys. Keys are per WeakMap are unique and setting the same key will overwrite the old value. WeakMaps provide for no method of iteration or listing the keys or values contained inside. Because WeakMaps expose no method of listing keys or values, and keys are required to be full-fledged objects with unique identities, the only way to extract a value from it is by having a direct reference to the object used as the key.\n\n* __set__ `weakmap.set(key, value)`. Key is any value including objects. Only non-primitives can be used as keys.\n* __get__ `weakmap.get(key)`. Returns the value that key corresponds to the key or undefined.\n* __has__ `weakmap.has(key)`. Returns boolean.\n* __delete__ `weakmap.delete(key)`. Removes value from the WeakMap if found. Returns true.\n\nWeakMaps allow for some interesting use cases like anonymous communication channels where neither side can identify the other, and no one else can eavesdrop. By using using a target object as its own key to retrieve a hidden seceret value no information about the origin can be obtained.\n\n__All non-primitives__ are valid keys, including WeakMaps themselves.\n\n\n# Map\n\nMaps are much the same as WeakMaps but they can be iterated and thus their contents can be inspected. Many use cases have no requirement for anonymity or special garbage collection, but can benefit from using objects as keys and also not having the storage contained in the Map itself.\n\n* __set__ `map.set(key, value)`. Key is any value including objects. Primitives are valid keys but uniqueness is matched by their value since primitives don't have identity. Objects are matched by identity. Returns the value passed in.\n* __get__ `map.get(key)`. Returns the value that key corresponds to or undefined.\n* __has__ `map.has(key)`. Returns boolean.\n* __delete__ `map.delete(key)`. Removes value from the Map if found. Returns true.\n* __keys__ `map.keys()`. Returns array of contained keys.\n* __values__ `map.values()`. Return array of contained values.\n* __iterate__ `map.iterate(callback, context)`. Loop through the Map executing callback with the signature `callback.call(context || global, value, key)`.\n* __toArray__ `map.toArray()`. Return array of Pair objects of the form `{ key: KEY, value: VALUE }`.\n\n__All possible values__ are valid keys, including undefined, null, and NaN.\n\n\n# Hash\n\nAs an added bonus, Hash is also exported. This has the same API as a Map except it only accepts primitive keys.\n\n* __set__ `hash.set(key, value)`. Key is any value including objects. Primitives are valid keys but uniqueness is matched by their value since primitives don't have identity. Objects are matched by identity. Returns the value passed in.\n* __get__ `hash.get(key)`. Returns the value that key corresponds to or undefined.\n* __has__ `hash.has(key)`. Returns boolean.\n* __delete__ `hash.delete(key)`. Removes value from the Map if found. Returns true.\n* __keys__ `hash.keys()`. Returns array of contained keys.\n* __values__ `hash.values()`. Return array of contained values.\n* __iterate__ `hash.iterate(callback, context)`. Loop through the Map executing callback with the signature `callback.call(context || global, value, key)`.\n* __toArray__ `hash.values()`. Return array of Pair objects of the form `{ key: KEY, value: VALUE }`.\n* __toObject__ `hash.toArray()`. Returns a plain object with the keys and values.\n\n__Primitives__ are valid keys, specifically numbers and strings. All input values are coerced to strings so you can give it any value, but they will be converted to string keys.\n\n\n# Set\n\nSets are similar to arrays but enforce uniqueness of values. Adding the same value twice will only result in one being added to the set.\n\n* __add__ `set.add(value)`. Inserts a value of any type into the set if it's not already in the set.\n* __has__ `set.has(value)`. Returns boolean.\n* __delete__ `set.delete(value)`. Removes value from the Set if found. Returns true.\n* __values__ `set.values()`. Return array of contained values.\n* __iterate__ `set.iterate(callback, context)`. Loop through the Set executing callback with the signature `callback.call(context || global, value, index)`.","_id":"harmony-collections@0.2.9","dist":{"shasum":"e11b19193db272a726d73b435b39ecf3a76c3353","tarball":"https://registry.npmjs.org/harmony-collections/-/harmony-collections-0.2.9.tgz","integrity":"sha512-MDKSBd/HN63Gii1bsDzI2sD3uO86T9e6o7LVqVfuXQHcfxmv0VhnVFm9SXx3NF60lOh1uY9nW3l5xP02ZCwDWQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDCu5g+LaEXgkoMbucHmNbC+p3a53K5YQUn1B+UaJNMOAIhAMlN1q/R5EdXEaOaGCp4Wh/BhSJnMNzHMFkZod+aUQ4X"}]},"maintainers":[{"name":"benvie","email":"brandon@bbenvie.com"}]},"0.3.1":{"author":{"name":"Brandon Benvie","email":"brandon@bbenvie.com","url":"http://bbenvie.com"},"name":"harmony-collections","description":"Shim to provide Map, Set, and WeakMap if they're not available, with non-leaky O(1) lookup WeakMaps","keywords":["harmony","collection","weakmap","map","set","ecmascript","shim","garbage collection"],"version":"0.3.1","homepage":"https://github.com/Benvie/ES6-Harmony-Collections-Shim","repository":{"type":"git","url":"https://github.com/Benvie/ES6-Harmony-Collections-Shim"},"main":"harmony-collections.js","engines":{"node":"0.6"},"dependencies":{},"devDependencies":{"tap":"*"},"readme":"# Harmony Collections Shim\n\nProvides Map, Set, and WeakMap with the same usage as the new ES6 native versions. Values in Harmony Collections are not contained in the collection instance itself, like array items and object properties, but in a private store. It's not possible to get access to or inspect the store directly.\n\nFor WeakMaps this means there's no way to find what's inside it or how many items are contained, and the only way to get a reference to a value is if you have a direct reference to the key object that links to it.\n\n# Compatability\n\nWorks with IE9+, Chrome, Firefox, Safari, untested in Opera.\n\n# Collections Usage\n\nMaps, WeakMaps, Hashes, and Sets can each be created using their constructor with or without `new`. Examples:\n\n    var aWeakMap = new WeakMap;\n    var aMap = Map();\n    var aSet = new Set();\n\nItems in a collection do not appear in any manner through traditional inspection. The only way to interact with the data contained in a collection is by using the functions below.\n\n    var aWeakMap = new WeakMap;\n    aWeakMap.set(this, { secrets: 'Dark Secrets' });\n    console.log(Object.getOwnPropertyNames(aWeakMap)); // []\n    for (var k in aWeakMap) { console.log(k); }         // nothing\n    console.log(aWeakMap.get(this));                    // { secrets: 'Dark Secrets' }\n\n\n# WeakMap\n\nWeakMaps require the use of objects as keys; primitives are not valid keys. Keys are per WeakMap are unique and setting the same key will overwrite the old value. WeakMaps provide for no method of iteration or listing the keys or values contained inside. Because WeakMaps expose no method of listing keys or values, and keys are required to be full-fledged objects with unique identities, the only way to extract a value from it is by having a direct reference to the object used as the key.\n\n* __set__ `weakmap.set(key, value)`. Key is any value including objects. Only non-primitives can be used as keys. Returns undefined.\n* __get__ `weakmap.get(key)`. Returns the value that key corresponds to the key or undefined.\n* __has__ `weakmap.has(key)`. Returns boolean.\n* __delete__ `weakmap.delete(key)`. Removes value from the WeakMap if found. Returns true.\n\nWeakMaps allow for some interesting use cases like anonymous communication channels where neither side can identify the other, and no one else can eavesdrop. By using using a target object as its own key to retrieve a hidden seceret value no information about the origin can be obtained.\n\n__All non-primitives__ are valid keys, including WeakMaps themselves.\n\n\n# Map\n\nMaps are much the same as WeakMaps but they can be iterated and thus their contents can be inspected. Many use cases have no requirement for anonymity or special garbage collection, but can benefit from using objects as keys and also not having the storage contained in the Map itself.\n\n* __set__ `map.set(key, value)`. Key is any value including objects. Returns undefined.\n* __get__ `map.get(key)`. Returns the value that key corresponds to or undefined.\n* __has__ `map.has(key)`. Returns boolean.\n* __delete__ `map.delete(key)`. Removes value from the Map if found. Returns true.\n* __forEach__ `map.forEach(callback, context)`. Loop through the collection raising callback for each.\n* __map__ `map.forEach(callback, context)`. Loop through the collection adding the return value for each to an array and returns it.\n\n__All possible values__ are valid keys, including undefined, null, and NaN.\n\n\n# Hash\n\nAs an added bonus, Hash is also exported. This has the same API as a Map except it only accepts primitive keys.\n\n* __set__ `hash.set(key, value)`. Key must be primitive. Returns undefined.\n* __get__ `hash.get(key)`. Returns the value that key corresponds to or undefined.\n* __has__ `hash.has(key)`. Returns boolean.\n* __delete__ `hash.delete(key)`. Removes value from the Map if found. Returns true.\n* __forEach__ `map.forEach(callback, context)`. Loop through the collection raising callback for each.\n* __map__ `map.forEach(callback, context)`. Loop through the collection adding the return value for each to an array and returns it.\n\n__Primitives__ are valid keys, specifically numbers and strings. All input values are coerced to strings so you can give it any value, but they will be converted to string keys.\n\n\n# Set\n\nSets are similar to arrays but enforce uniqueness of values. Adding the same value twice will only result in one being added to the set.\n\n* __add__ `set.add(value)`. Inserts a value of any type into the set if it's not already in the set.\n* __has__ `set.has(value)`. Returns boolean.\n* __delete__ `set.delete(value)`. Removes value from the Set if found. Returns true.\n* __forEach__ `map.forEach(callback, context)`. Loop through the collection raising callback for each.\n* __map__ `map.forEach(callback, context)`. Loop through the collection adding the return value for each to an array and returns it.\n","_id":"harmony-collections@0.3.1","dist":{"shasum":"34507b5c3f20f6e89c34a2717150770190743ab5","tarball":"https://registry.npmjs.org/harmony-collections/-/harmony-collections-0.3.1.tgz","integrity":"sha512-zcq6YzRCJawm8FIVU3RoXyfnTH2e5Zo9v8QpdBKSZu/wY3Vgqfo9+vum95tPmu6yxhUGFxylYj1V24b2SmTw3g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG3CTOHYJW+9S8bTUabP3s8vkMkZGI1toOglBr2e8XpwAiEA17U8885cB6wNqqgwFk+0zZ2+wC30IQylODvjiTgICKk="}]},"_npmVersion":"1.1.61","_npmUser":{"name":"benvie","email":"brandon@bbenvie.com"},"maintainers":[{"name":"benvie","email":"brandon@bbenvie.com"}]},"0.3.2":{"author":{"name":"Brandon Benvie","email":"http://bbenvie.com"},"name":"harmony-collections","description":"Shim to provide Map, Set, and WeakMap if they're not available, with non-leaky O(1) lookup WeakMaps","keywords":["harmony","collection","weakmap","map","set","ecmascript","shim","garbage collection",""],"version":"0.3.2","homepage":"https://github.com/Benvie/ES6-Harmony-Collections-Shim","repository":{"type":"git","url":"https://github.com/Benvie/ES6-Harmony-Collections-Shim"},"main":"harmony-collections.js","dependencies":{},"devDependencies":{"tap":"*"},"readme":"# Harmony Collections Shim\n\nProvides Map, Set, and WeakMap with the same usage as the new ES6 native versions. Values in Harmony Collections are not contained in the collection instance itself, like array items and object properties, but in a private store. It's not possible to get access to or inspect the store directly.\n\nFor WeakMaps this means there's no way to find what's inside it or how many items are contained, and the only way to get a reference to a value is if you have a direct reference to the key object that links to it.\n\n# Compatability\n\nWorks with IE9+, Chrome, Firefox, Safari, untested in Opera.\n\n# Collections Usage\n\nMaps, WeakMaps, Hashes, and Sets can each be created using their constructor with or without `new`. Examples:\n\n    var aWeakMap = new WeakMap;\n    var aMap = Map();\n    var aSet = new Set();\n\nItems in a collection do not appear in any manner through traditional inspection. The only way to interact with the data contained in a collection is by using the functions below.\n\n    var aWeakMap = new WeakMap;\n    aWeakMap.set(this, { secrets: 'Dark Secrets' });\n    console.log(Object.getOwnPropertyNames(aWeakMap)); // []\n    for (var k in aWeakMap) { console.log(k); }         // nothing\n    console.log(aWeakMap.get(this));                    // { secrets: 'Dark Secrets' }\n\n\n# WeakMap\n\nWeakMaps require the use of objects as keys; primitives are not valid keys. Keys are per WeakMap are unique and setting the same key will overwrite the old value. WeakMaps provide for no method of iteration or listing the keys or values contained inside. Because WeakMaps expose no method of listing keys or values, and keys are required to be full-fledged objects with unique identities, the only way to extract a value from it is by having a direct reference to the object used as the key.\n\n* __set__ `weakmap.set(key, value)`. Key is any value including objects. Only non-primitives can be used as keys. Returns undefined.\n* __get__ `weakmap.get(key)`. Returns the value that key corresponds to the key or undefined.\n* __has__ `weakmap.has(key)`. Returns boolean.\n* __delete__ `weakmap.delete(key)`. Removes value from the WeakMap if found. Returns true.\n\nWeakMaps allow for some interesting use cases like anonymous communication channels where neither side can identify the other, and no one else can eavesdrop. By using using a target object as its own key to retrieve a hidden seceret value no information about the origin can be obtained.\n\n__All non-primitives__ are valid keys, including WeakMaps themselves.\n\n\n# Map\n\nMaps are much the same as WeakMaps but they can be iterated and thus their contents can be inspected. Many use cases have no requirement for anonymity or special garbage collection, but can benefit from using objects as keys and also not having the storage contained in the Map itself.\n\n* __set__ `map.set(key, value)`. Key is any value including objects. Returns undefined.\n* __get__ `map.get(key)`. Returns the value that key corresponds to or undefined.\n* __has__ `map.has(key)`. Returns boolean.\n* __delete__ `map.delete(key)`. Removes value from the Map if found. Returns true.\n* __forEach__ `map.forEach(callback, context)`. Loop through the collection raising callback for each.\n* __map__ `map.forEach(callback, context)`. Loop through the collection adding the return value for each to an array and returns it.\n\n__All possible values__ are valid keys, including undefined, null, and NaN.\n\n\n# Hash\n\nAs an added bonus, Hash is also exported. This has the same API as a Map except it only accepts primitive keys.\n\n* __set__ `hash.set(key, value)`. Key must be primitive. Returns undefined.\n* __get__ `hash.get(key)`. Returns the value that key corresponds to or undefined.\n* __has__ `hash.has(key)`. Returns boolean.\n* __delete__ `hash.delete(key)`. Removes value from the Map if found. Returns true.\n* __forEach__ `map.forEach(callback, context)`. Loop through the collection raising callback for each.\n* __map__ `map.forEach(callback, context)`. Loop through the collection adding the return value for each to an array and returns it.\n\n__Primitives__ are valid keys, specifically numbers and strings. All input values are coerced to strings so you can give it any value, but they will be converted to string keys.\n\n\n# Set\n\nSets are similar to arrays but enforce uniqueness of values. Adding the same value twice will only result in one being added to the set.\n\n* __add__ `set.add(value)`. Inserts a value of any type into the set if it's not already in the set.\n* __has__ `set.has(value)`. Returns boolean.\n* __delete__ `set.delete(value)`. Removes value from the Set if found. Returns true.\n* __forEach__ `map.forEach(callback, context)`. Loop through the collection raising callback for each.\n* __map__ `map.forEach(callback, context)`. Loop through the collection adding the return value for each to an array and returns it.\n","_id":"harmony-collections@0.3.2","dist":{"shasum":"97fce7558c177d57f40998afdb56bac6718ea7b6","tarball":"https://registry.npmjs.org/harmony-collections/-/harmony-collections-0.3.2.tgz","integrity":"sha512-FWn91YMzWkLfbLhZCoYmfNr+RkWyl0Ddr/FxcT5S6bTyEfcMhGeA0zp52Eg/Kq+USS/WzPRky2fZXUEbDJedpQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGJH4Dlx4DqCQVN1QfJ+g0bGrgqIONkFunMC0AXn4VSoAiA5DHQsfN/9k7BKl6g+5ynJbeCk4i110KkXPwudBShM7Q=="}]},"_npmVersion":"1.1.61","_npmUser":{"name":"benvie","email":"brandon@bbenvie.com"},"maintainers":[{"name":"benvie","email":"brandon@bbenvie.com"}]},"0.3.3":{"author":{"name":"Brandon Benvie","email":"http://bbenvie.com"},"name":"harmony-collections","description":"Shim to provide Map, Set, and WeakMap if they're not available, with non-leaky O(1) lookup WeakMaps","keywords":["harmony","collection","weakmap","map","set","ecmascript","shim","garbage collection",""],"version":"0.3.3","homepage":"https://github.com/Benvie/ES6-Harmony-Collections-Shim","repository":{"type":"git","url":"https://github.com/Benvie/ES6-Harmony-Collections-Shim"},"main":"harmony-collections.js","dependencies":{},"devDependencies":{"tap":"*"},"license":"MIT","readme":"# Harmony Collections Shim\n\nProvides Map, Set, and WeakMap with the same usage as the new ES6 native versions. Values in Harmony Collections are not contained in the collection instance itself, like array items and object properties, but in a private store. It's not possible to get access to or inspect the store directly.\n\nFor WeakMaps this means there's no way to find what's inside it or how many items are contained, and the only way to get a reference to a value is if you have a direct reference to the key object that links to it.\n\n# Compatability\n\nWorks with IE9+, Chrome, Firefox, Safari, untested in Opera.\n\n# Collections Usage\n\nMaps, WeakMaps, Hashes, and Sets can each be created using their constructor with or without `new`. Examples:\n\n    var aWeakMap = new WeakMap;\n    var aMap = Map();\n    var aSet = new Set();\n\nItems in a collection do not appear in any manner through traditional inspection. The only way to interact with the data contained in a collection is by using the functions below.\n\n    var aWeakMap = new WeakMap;\n    aWeakMap.set(this, { secrets: 'Dark Secrets' });\n    console.log(Object.getOwnPropertyNames(aWeakMap)); // []\n    for (var k in aWeakMap) { console.log(k); }         // nothing\n    console.log(aWeakMap.get(this));                    // { secrets: 'Dark Secrets' }\n\n\n# WeakMap\n\nWeakMaps require the use of objects as keys; primitives are not valid keys. Keys are per WeakMap are unique and setting the same key will overwrite the old value. WeakMaps provide for no method of iteration or listing the keys or values contained inside. Because WeakMaps expose no method of listing keys or values, and keys are required to be full-fledged objects with unique identities, the only way to extract a value from it is by having a direct reference to the object used as the key.\n\n* __set__ `weakmap.set(key, value)`. Key is any value including objects. Only non-primitives can be used as keys. Returns undefined.\n* __get__ `weakmap.get(key)`. Returns the value that key corresponds to the key or undefined.\n* __has__ `weakmap.has(key)`. Returns boolean.\n* __delete__ `weakmap.delete(key)`. Removes value from the WeakMap if found. Returns true.\n\nWeakMaps allow for some interesting use cases like anonymous communication channels where neither side can identify the other, and no one else can eavesdrop. By using using a target object as its own key to retrieve a hidden seceret value no information about the origin can be obtained.\n\n__All non-primitives__ are valid keys, including WeakMaps themselves.\n\n\n# Map\n\nMaps are much the same as WeakMaps but they can be iterated and thus their contents can be inspected. Many use cases have no requirement for anonymity or special garbage collection, but can benefit from using objects as keys and also not having the storage contained in the Map itself.\n\n* __set__ `map.set(key, value)`. Key is any value including objects. Returns undefined.\n* __get__ `map.get(key)`. Returns the value that key corresponds to or undefined.\n* __has__ `map.has(key)`. Returns boolean.\n* __delete__ `map.delete(key)`. Removes value from the Map if found. Returns true.\n* __forEach__ `map.forEach(callback, context)`. Loop through the collection raising callback for each.\n* __map__ `map.forEach(callback, context)`. Loop through the collection adding the return value for each to an array and returns it.\n\n__All possible values__ are valid keys, including undefined, null, and NaN.\n\n\n# Hash\n\nAs an added bonus, Hash is also exported. This has the same API as a Map except it only accepts primitive keys.\n\n* __set__ `hash.set(key, value)`. Key must be primitive. Returns undefined.\n* __get__ `hash.get(key)`. Returns the value that key corresponds to or undefined.\n* __has__ `hash.has(key)`. Returns boolean.\n* __delete__ `hash.delete(key)`. Removes value from the Map if found. Returns true.\n* __forEach__ `map.forEach(callback, context)`. Loop through the collection raising callback for each.\n* __map__ `map.forEach(callback, context)`. Loop through the collection adding the return value for each to an array and returns it.\n\n__Primitives__ are valid keys, specifically numbers and strings. All input values are coerced to strings so you can give it any value, but they will be converted to string keys.\n\n\n# Set\n\nSets are similar to arrays but enforce uniqueness of values. Adding the same value twice will only result in one being added to the set.\n\n* __add__ `set.add(value)`. Inserts a value of any type into the set if it's not already in the set.\n* __has__ `set.has(value)`. Returns boolean.\n* __delete__ `set.delete(value)`. Removes value from the Set if found. Returns true.\n* __forEach__ `map.forEach(callback, context)`. Loop through the collection raising callback for each.\n* __map__ `map.forEach(callback, context)`. Loop through the collection adding the return value for each to an array and returns it.\n\n\n\n\n## License\n\n(The MIT License)\nCopyright (c) 2012 Brandon Benvie <http://bbenvie.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files\n(the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge,\npublish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included with all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE\nFOR ANY  CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH\nTHE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","_id":"harmony-collections@0.3.3","dist":{"shasum":"38fc811e07714001831c2c386aaf78b287033608","tarball":"https://registry.npmjs.org/harmony-collections/-/harmony-collections-0.3.3.tgz","integrity":"sha512-Ig9F2WaFtYWQGWHXGiYVsRL+WJtgoo7Rhxokt2i9jAQd24KGFp6qIZiNbND96STMj9xyKMlr6xRwIiaIxOScrA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFe1YyfJlUKTijlEpGoXZUZWlO5d5+sS9P7EMvgsOiCrAiBbxjhbIVVE2JVSS6GgNSMDk7050OssTEzMjM340zbVKA=="}]},"_npmVersion":"1.1.61","_npmUser":{"name":"benvie","email":"brandon@bbenvie.com"},"maintainers":[{"name":"benvie","email":"brandon@bbenvie.com"}]},"0.3.4":{"author":{"name":"Brandon Benvie","email":"http://bbenvie.com"},"name":"harmony-collections","description":"Shim to provide Map, Set, and WeakMap if they're not available, with non-leaky O(1) lookup WeakMaps","keywords":["harmony","collection","weakmap","map","set","ecmascript","es6","shim","garbage collection","gc"],"version":"0.3.4","homepage":"http://benvie.github.com/harmony-collections","repository":{"type":"git","url":"https://github.com/Benvie/harmony-collections"},"main":"harmony-collections.js","dependencies":{},"devDependencies":{"tap":"*"},"license":"MIT","readme":"# Harmony Collections Shim\n\nUse the new __Map__, __Set__, and __WeakMap__ from the upcoming ES6 standard right now! This shim provides full functionality for these collections and delivers the benefits of using them.\n\n## Compatability\n\nWorks with IE9+, Chrome, Firefox, Safari, untested in Opera. __IE8 support has been recently added but is experimental.__\n\n## Install/Use\n\nIf using node, install via:\n\n    npm install harmony-collections\n\nIn the browser, include __harmony-collection.js__ or __harmony-collections.min.js__ and Map, WeakMap, Set, and HashMap will be exposed on the window. (you can also define `window.exports` which will cause them to end up there).\n\n## Overview\n\nES6 Collections provide a new core weapon to your JS arsenal: objects as keys. This allows you to do the following awesome things: store private data \"on\" public objects, private properties, secretly \"tag\" objects, namespace properties, access controlled properties, check object uniqueness in __O(1)__ time complexity.\n\n### WeakMap Garbage Collection Semantics\n\nThe benefit of using WeakMaps is enhanced garbage collection. In a WeakMap, the only reference created is key -> value, so it's possible for a key/value in a WeakMap to be garbage collected while the WeakMap they're in still exists! Compare this to an Array, where all items in the Array will not be garbage collected as long as the Array isn't. This forces either explicitly management of the object lifespans, or more commonly is simply a memory leak.\n\nFor example, data stored using jQuery.data can never be garbage collected unless explicitly nulled out, because it is stored in a container that strongly references it. Using a WeakMap, it's possible to associate data with an element and have the data destroyed when the element is without memory leaking the element, i.e. `weakmap.set(element, { myData: 'gc safe!' })`. jQuery.data (every library has similar functionality) prevent the element from memory leaking by using a numeric id, but this does nothing for the __data__ that is stored.\n\n## Detailed Examples\n\n### Map/WeakMap\nRetire jQuery.data and similar, consider it replaced with prejudice.\n\n```javascript\n// reusable storage creator for making as many separate stores as needed\nfunction createStorage(){\n  var store = new WeakMap;\n  return function(o){\n    var v = store.get(o);\n    if (!v) store.set(o, v = {});\n    return v;\n  };\n}\n\n// now we can create private/namespaced properties associated with objects\nvar _ = createStorage();\n\nfunctioon Wrapper(element){\n  var _element = _(element);\n  if (_element.wrapper)\n    return _element.wrapper;\n\n  _element.wrapper = this;\n  _(this).element = element;\n}\n\nWrapper.prototype = {\n  get classes(){\n    return [].slice.call(_(this).element);\n  },\n  set classes(v){\n    _(this).element.className = [].concat(v).join(' ');\n  }\n};\n```\n\n### Set\nA Set is similar to an Array in what it stores, but different in how. A Set is unordered and its values are unique. Determining whether an item is in a Set is __O(1)__ but __O(n)__ for an Array. An example of where this is useful is in implementing `Array.prototype.unique`.\n\n```javascript\nfunction uniqueUsingIndexOf(array){\n  return array.filter(function(item, index){\n    return array.lastIndexOf(item) > index;\n  });\n}\n\nfunction uniqueUsingSet(array){\n  var seen = new Set;\n  return array.filter(function(item){\n    if (!seen.has(item)) {\n      seen.add(item);\n      return true;\n    }\n  });\n}\n```\n\nBoth will output the same result, however the version using the set is __O(n)__ and the one using indexOf is __O(n^2)__. For an array taking 30 seconds using the set, an __*hour*__ is required for indexOf.\n\n## API Reference\n\n### WeakMap\n\nWeakMaps require the use of objects as keys; primitives are not valid keys. Keys are unique per WeakMap; setting the same key will overwrite the old value. WeakMaps have no way to enumerate their keys or values. Because of this, the only way to retrieve a value from a WeakMap is to have access to both the WeakMap itself as well as the object used as the key.\n\n* __set__ `weakmap.set(key, value)`. Key is any value including objects. Only non-primitives can be used as keys. Returns undefined.\n* __get__ `weakmap.get(key)`. Returns the value that key corresponds to the key or undefined.\n* __has__ `weakmap.has(key)`. Returns boolean.\n* __delete__ `weakmap.delete(key)`. Removes value from the collection if found. Returns true.\n\nWeakMaps allow for some interesting use cases like anonymous communication channels where neither side can identify the other, and no one else can eavesdrop. By using using a target object as its own key to retrieve a hidden seceret value no information about the origin can be obtained.\n\n__Non-primitives__ are valid keys. Objects, functions, DOM nodes, etc.\n\n\n### HashMap\n\nThough not part of ES6, HashMap is also exported. This has the same API as a Map except it only accepts primitive keys. This is needed to implement Map so as a bonus it's exported as well.\n\n* __set__ `hashmap.set(key, value)`. Key must be primitive. Returns undefined.\n* __get__ `hashmap.get(key)`. Returns the value that key corresponds to or undefined.\n* __has__ `hashmap.has(key)`. Returns boolean.\n* __delete__ `hashmap.delete(key)`. Removes value from the collection if found. Returns true.\n* __forEach__ `hashmap.forEach(callback, context)`. Loop through the collection raising callback for each.\n* __map__ `hashmap.map(callback, context)`. Loop through the collection adding the return value for each to an array and returns it.\n\n__Primitives__ are valid keys. Exact value is used, so `500` is different from `\"500\"`, `-0` is different from `0`, ``\"false\"` isn't `false`, etc. NaN does equal itself when used as a key (as opposed to everywhere else in JS).\n\n\n### Map\n\nMaps are much the same as WeakMaps but they can be iterated and thus their contents can be inspected. Many use cases have no requirement for anonymity or special garbage collection, but can benefit from using objects as keys and also not having the storage contained in the Map itself.\n\n* __set__ `map.set(key, value)`. Key is any value including objects. Returns undefined.\n* __get__ `map.get(key)`. Returns the value that key corresponds to or undefined.\n* __has__ `map.has(key)`. Returns boolean.\n* __delete__ `map.delete(key)`. Removes value from the collection if found. Returns true.\n* __forEach__ `map.forEach(callback, context)`. Loop through the collection raising callback for each.\n* __map__ `map.map(callback, context)`. Loop through the collection adding the return value for each to an array and returns it.\n\n__All possible values__ are valid keys, including -0, undefined, null, and NaN. Uses a HashMap and WeakMap together to cover primitives and non-primitives.\n\n\n\n### Set\n\nSets are similar to arrays but enforce uniqueness of values and are unordered. Adding the same value twice will only result in one being added to the set.\n\n* __add__ `set.add(value)`. Inserts a value of any type into the set if it's not already in the set.\n* __has__ `set.has(value)`. Returns boolean.\n* __delete__ `set.delete(value)`. Removes value from the collection if found. Returns true.\n* __forEach__ `set.forEach(callback, context)`. Loop through the collection raising callback for each.\n* __map__ `set.map(callback, context)`. Loop through the collection adding the return value for each to an array and returns it.\n\n\n\n\n## License\n\n(The MIT License)\nCopyright (c) 2012 Brandon Benvie <http://bbenvie.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files\n(the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge,\npublish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included with all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE\nFOR ANY  CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH\nTHE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","_id":"harmony-collections@0.3.4","dist":{"shasum":"4091852c57f56c7c41138ada2ed785044878e726","tarball":"https://registry.npmjs.org/harmony-collections/-/harmony-collections-0.3.4.tgz","integrity":"sha512-+qGdhZmtgq0uE8stdrxtxW2Nv//lBTfeCmvgC2rd8h6xyq/qAtfzKdmxzsgimVbvJDnR1Q1IlJpZERxuxUfReA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDHOeaVuM0dqG3UtaHWSsjHyPYVyFqMb+pXKed/6P/5gwIgDcH0xOERkccNB7zCjiQMaJ0Ct5cAxAxB9bak3GhI/J8="}]},"_npmVersion":"1.1.61","_npmUser":{"name":"benvie","email":"brandon@bbenvie.com"},"maintainers":[{"name":"benvie","email":"brandon@bbenvie.com"}]},"0.3.5":{"author":{"name":"Brandon Benvie","email":"http://bbenvie.com"},"name":"harmony-collections","description":"Shim to provide Map, Set, and WeakMap if they're not available, with non-leaky O(1) lookup WeakMaps","keywords":["harmony","collection","weakmap","map","set","ecmascript","es6","shim","garbage collection","gc"],"version":"0.3.5","homepage":"http://benvie.github.com/harmony-collections","repository":{"type":"git","url":"https://github.com/Benvie/harmony-collections"},"main":"harmony-collections.js","dependencies":{},"devDependencies":{"tap":"*"},"license":"MIT","readme":"# Harmony Collections Shim\n\nUse the new __Map__, __Set__, and __WeakMap__ from the upcoming ES6 standard right now! This shim provides full functionality for these collections and delivers the benefits of using them.\n\n## Compatability\n\nWorks with IE9+, Chrome, Firefox, Safari, untested in Opera. __IE8 support has been recently added but is experimental.__\n\n## Install/Use\n\nIf using node, install via:\n\n    npm install harmony-collections\n\nIn the browser, include __harmony-collection.js__ or __harmony-collections.min.js__ and Map, WeakMap, Set, and HashMap will be exposed on the window. (you can also define `window.exports` which will cause them to end up there).\n\n## Overview\n\nES6 Collections provide a new core weapon to your JS arsenal: objects as keys. This allows you to do the following awesome things: store private data \"on\" public objects, private properties, secretly \"tag\" objects, namespace properties, access controlled properties, check object uniqueness in `O(1)` time complexity.\n\n### WeakMap Garbage Collection Semantics\n\nThe benefit of using WeakMaps is enhanced garbage collection. In a WeakMap, the only reference created is key -> value, so it's possible for a key/value in a WeakMap to be garbage collected while the WeakMap they're in still exists! Compare this to an Array, where all items in the Array will not be garbage collected as long as the Array isn't. This forces either explicitly management of the object lifespans, or more commonly is simply a memory leak.\n\nFor example, data stored using jQuery.data can never be garbage collected unless explicitly nulled out, because it is stored in a container that strongly references it. Using a WeakMap, it's possible to associate data with an element and have the data destroyed when the element is without memory leaking the element, i.e. `weakmap.set(element, { myData: 'gc safe!' })`. jQuery.data (every library has similar functionality) prevent the element from memory leaking by using a numeric id, but this does nothing for the __data__ that is stored.\n\n## Detailed Examples\n\n### Map/WeakMap\nRetire jQuery.data and similar, consider it replaced with prejudice.\n\n```javascript\n// reusable storage creator for making as many separate stores as needed\nfunction createStorage(){\n  var store = new WeakMap;\n  return function(o){\n    var v = store.get(o);\n    if (!v) store.set(o, v = {});\n    return v;\n  };\n}\n\n// now we can create private/namespaced properties associated with objects\nvar _ = createStorage();\n\nfunctioon Wrapper(element){\n  var _element = _(element);\n  if (_element.wrapper)\n    return _element.wrapper;\n\n  _element.wrapper = this;\n  _(this).element = element;\n}\n\nWrapper.prototype = {\n  get classes(){\n    return [].slice.call(_(this).element);\n  },\n  set classes(v){\n    _(this).element.className = [].concat(v).join(' ');\n  }\n};\n```\n\n### Set\nA Set is similar to an Array in what it stores, but different in how. A Set is unordered and its values are unique. Determining whether an item is in a Set is `O(1)` but `O(n)` for an Array. An example of where this is useful is in implementing `Array.prototype.unique`.\n\nBoth of the following will output the same result, however the Set version is `O(n)` and the one using indexOf is `O(n^2)`. For an array taking 30 seconds using the set, an __*hour*__ is required for indexOf.\n\n```javascript\nfunction uniqueUsingIndexOf(array){\n  return array.filter(function(item, index){\n    return array.lastIndexOf(item) > index;\n  });\n}\n\nfunction uniqueUsingSet(array){\n  var seen = new Set;\n  return array.filter(function(item){\n    if (!seen.has(item)) {\n      seen.add(item);\n      return true;\n    }\n  });\n}\n```\n\n\n## API Reference\n\n### WeakMap\n\n__Non-primitives__ are valid keys. Objects, functions, DOM nodes, etc.\n\nWeakMaps require the use of objects as keys; primitives are not valid keys. WeakMaps have no way to enumerate their keys or values. Because of this, the only way to retrieve a value from a WeakMap is to have access to both the WeakMap itself as well as the object used as the key.\n\n* `WeakMap#set(key, value)` Key is any value including objects. Only non-primitives can be used as keys. Returns undefined.\n* `WeakMap#get(key)` Returns the value that key corresponds to the key or undefined.\n* `WeakMap#has(key)` Returns boolean.\n* `WeakMap#delete(key)` Removes value from the collection if found. Returns true.\n\n\n### HashMap\n\n__Primitives__ are valid keys. Exact value is used, so `500` is different from `\"500\"`, `-0` is different from `0`, ``\"false\"` isn't `false`, etc. NaN does equal itself when used as a key (as opposed to everywhere else in JS).\n\nThough not part of ES6, HashMap is also exported. This has the same API as a Map except it only accepts primitive keys. This is needed to implement Map so as a bonus it's exported as well.\n\n* `HashMap#set(key, value)` Key must be primitive. Returns undefined.\n* `HashMap#get(key)` Returns the value that key corresponds to or undefined.\n* `HashMap#has(key)` Returns boolean.\n* `HashMap#delete(key)` Removes value from the collection if found. Returns true.\n* `HashMap#forEach(callback, context)` Loop through the collection raising callback for each.\n* `HashMap#map(callback, context)` Loop through the collection adding the return value for each to an array and returns it.\n\n\n### Map\n\n__All possible values__ are valid keys, including -0, undefined, null, and NaN. Uses a HashMap and WeakMap together to cover primitives and non-primitives.\n\nMaps are much the same as WeakMaps but they can be iterated and thus their contents can be inspected. Many use cases have no requirement for anonymity or special garbage collection, but can benefit from using objects as keys and also not having the storage contained in the Map itself.\n\n* `Map#set(key, value)` Key is any value including objects. Returns undefined.\n* `Map#get(key)` Returns the value that key corresponds to or undefined.\n* `Map#has(key)` Returns boolean.\n* `Map#delete(key)` Removes value from the collection if found. Returns true.\n* `Map#forEach(callback, context)` Loop through the collection raising callback for each.\n* `Map#map(callback, context)` Loop through the collection adding the return value for each to an array and returns it.\n\n\n### Set\n\nSets are similar to arrays but enforce uniqueness of values and are unordered. Adding the same value twice will only result in one being added to the set.\n\n* `Set#add(value)` Inserts a value of any type into the set if it's not already in the set.\n* `Set#has(value)` Returns boolean.\n* `Set#delete(value)` Removes value from the collection if found. Returns true.\n* `Set#forEach(callback, context)` Loop through the collection raising callback for each.\n* `Set#map(callback, context)` Loop through the collection adding the return value for each to an array and returns it.\n\n\n\n## License\n\n(The MIT License)\nCopyright (c) 2012 Brandon Benvie <http://bbenvie.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files\n(the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge,\npublish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included with all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE\nFOR ANY  CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH\nTHE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","_id":"harmony-collections@0.3.5","dist":{"shasum":"5648621726d6700b4af29f38cae28a6dbeea452d","tarball":"https://registry.npmjs.org/harmony-collections/-/harmony-collections-0.3.5.tgz","integrity":"sha512-HR2CJYS00X1hEfT6rYULuT06Hk+aURii03oyQV7+0PZ3poDjN1xUOI6fBVLZYJbYyeoqew7wwD2bGPvKKmXKew==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCGkqR91TPc2LNaJJac1befndKI1Gah1tWlOCseNU6gnAIgSLi72VQE2U3lRdGJaMECoBAvF9dS80JyyKtalGNY3g8="}]},"_npmVersion":"1.1.61","_npmUser":{"name":"benvie","email":"brandon@bbenvie.com"},"maintainers":[{"name":"benvie","email":"brandon@bbenvie.com"}]},"0.3.6":{"author":{"name":"Brandon Benvie","email":"http://bbenvie.com"},"name":"harmony-collections","description":"Shim to provide Map, Set, and WeakMap if they're not available, with non-leaky O(1) lookup WeakMaps","keywords":["harmony","collection","weakmap","map","set","ecmascript","es6","shim","garbage collection","gc"],"version":"0.3.6","homepage":"http://benvie.github.com/harmony-collections","repository":{"type":"git","url":"https://github.com/Benvie/harmony-collections"},"main":"harmony-collections.js","dependencies":{},"devDependencies":{"tap":"*"},"license":"MIT","readme":"# Harmony Collections Shim\n\nUse the new __Map__, __Set__, and __WeakMap__ from the upcoming ES6 standard right now! This shim provides full functionality for these collections and delivers the benefits of using them.\n\n## Compatability\n\nWorks with IE9+, Chrome, Firefox, Safari, untested in Opera. __IE8 support has been recently added but is experimental.__\n\n## Install/Use\n\nIf using node, install via:\n\n    npm install harmony-collections\n\nIn the browser, include __harmony-collection.js__ or __harmony-collections.min.js__ and Map, WeakMap, Set, and HashMap will be exposed on the window. (you can also define `window.exports` which will cause them to end up there).\n\n## Overview\n\nES6 Collections provide a new core weapon to your JS arsenal: objects as keys. This allows you to do the following awesome things: store private data \"on\" public objects, private properties, secretly \"tag\" objects, namespace properties, access controlled properties, check object uniqueness in `O(1)` time complexity.\n\n### WeakMap Garbage Collection Semantics\n\nThe benefit of using WeakMaps is enhanced garbage collection. In a WeakMap, the only reference created is key -> value, so it's possible for a key/value in a WeakMap to be garbage collected while the WeakMap they're in still exists! Compare this to an Array, where all items in the Array will not be garbage collected as long as the Array isn't. This forces either explicitly management of the object lifespans, or more commonly is simply a memory leak.\n\nFor example, data stored using jQuery.data can never be garbage collected unless explicitly nulled out, because it is stored in a container that strongly references it. Using a WeakMap, it's possible to associate data with an element and have the data destroyed when the element is without memory leaking the element, i.e. `weakmap.set(element, { myData: 'gc safe!' })`. jQuery.data (every library has similar functionality) prevent the element from memory leaking by using a numeric id, but this does nothing for the __data__ that is stored.\n\n## Detailed Examples\n\n### Map/WeakMap\nRetire jQuery.data and similar, consider it replaced with prejudice.\n\n```javascript\n// reusable storage creator\nfunction createStorage(){\n  var store = new WeakMap;\n  return function(o){\n    var v = store.get(o);\n    if (!v) store.set(o, v = {});\n    return v;\n  };\n}\n\n// allows private/namespaced properties for the objects\nvar _ = createStorage();\n\nfunctioon Wrapper(element){\n  var _element = _(element);\n  if (_element.wrapper)\n    return _element.wrapper;\n\n  _element.wrapper = this;\n  _(this).element = element;\n}\n\nWrapper.prototype = {\n  get classes(){\n    return [].slice.call(_(this).element);\n  },\n  set classes(v){\n    _(this).element.className = [].concat(v).join(' ');\n  }\n};\n```\n\n### Set\nA Set is similar to an Array in what it stores, but different in how. A Set is unordered and its values are unique. Determining whether an item is in a Set is `O(1)` but `O(n)` for an Array. An example of where this is useful is in implementing `Array.prototype.unique`.\n\nBoth of the following will output the same result, however the Set version is `O(n)` and the one using indexOf is `O(n^2)`. For an array taking 30 seconds using the set, an __*hour*__ is required for indexOf.\n\n```javascript\nfunction uniqueUsingIndexOf(array){\n  return array.filter(function(item, index){\n    return array.lastIndexOf(item) > index;\n  });\n}\n\nfunction uniqueUsingSet(array){\n  var seen = new Set;\n  return array.filter(function(item){\n    if (!seen.has(item)) {\n      seen.add(item);\n      return true;\n    }\n  });\n}\n```\n\n\n## API Reference\n\n### WeakMap\n\n__Non-primitives__ are valid keys. Objects, functions, DOM nodes, etc.\n\nWeakMaps require the use of objects as keys; primitives are not valid keys. WeakMaps have no way to enumerate their keys or values. Because of this, the only way to retrieve a value from a WeakMap is to have access to both the WeakMap itself as well as the object used as the key.\n\n* `new WeakMap()` Create a new WeakMap.\n* `WeakMap#set(key, value)` Key is any value including objects. Only non-primitives can be used as keys. Returns undefined.\n* `WeakMap#get(key)` Returns the value that key corresponds to the key or undefined.\n* `WeakMap#has(key)` Returns boolean.\n* `WeakMap#delete(key)` Removes value from the collection if found. Returns true.\n\n\n### HashMap\n\n__Primitives__ are valid keys. Exact value is used, so `500` is different from `\"500\"`, `-0` is different from `0`, ``\"false\"` isn't `false`, etc. NaN does equal itself when used as a key (as opposed to everywhere else in JS).\n\nThough not part of ES6, HashMap is also exported. This has the same API as a Map except it only accepts primitive keys. This is needed to implement Map so as a bonus it's exported as well.\n\n* `new HashMap(iterable)` Create a new HashMap populated with the iterable. Accepts __[[Key, Value]..], Array, Object, Collection__.\n* `HashMap#set(key, value)` Key must be primitive. Returns undefined.\n* `HashMap#get(key)` Returns the value that key corresponds to or undefined.\n* `HashMap#has(key)` Returns boolean.\n* `HashMap#delete(key)` Removes value from the collection if found. Returns true.\n* `HashMap#size()` Returns the number of items in the collection.\n* `HashMap#forEach(callback, context)` Loop through the collection raising callback for each.\n\n\n### Map\n\n__All possible values__ are valid keys, including -0, undefined, null, and NaN. Uses a HashMap and WeakMap together to cover primitives and non-primitives.\n\nMaps are much the same as WeakMaps but they can be iterated and thus their contents can be inspected. Many use cases have no requirement for anonymity or special garbage collection, but can benefit from using objects as keys and also not having the storage contained in the Map itself.\n\n* `new Map(iterable)` Create a new Map populated with the iterable. Accepts __[[Key, Value]..], Array, Object, Collection__.\n* `Map#set(key, value)` Key is any value including objects. Returns undefined.\n* `Map#get(key)` Returns the value that key corresponds to or undefined.\n* `Map#has(key)` Returns boolean.\n* `Map#delete(key)` Removes value from the collection if found. Returns true.\n* `Map#size()` Returns the number of items in the collection.\n* `Map#forEach(callback, context)` Loop through the collection raising callback for each.\n\n\n### Set\n\nSets are similar to arrays but enforce uniqueness of values and are unordered. Adding the same value twice will only result in one being added to the set.\n\n* `new Set(iterable)` Create a new Set populated with the iterable. Accepts __Array, Object, Collection__.\n* `Set#add(value)` Inserts a value of any type into the set if it's not already in the set.\n* `Set#has(value)` Returns boolean.\n* `Set#delete(value)` Removes value from the collection if found. Returns true.\n* `Set#size()` Returns the number of items in the collection.\n* `Set#forEach(callback, context)` Loop through the collection raising callback for each.\n\n\n\n## License\n\n(The MIT License)\nCopyright (c) 2012 Brandon Benvie <http://bbenvie.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files\n(the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge,\npublish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included with all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE\nFOR ANY  CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH\nTHE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","_id":"harmony-collections@0.3.6","dist":{"shasum":"9d870ded2cd616f7a2ef52f6307020e29a44d7ce","tarball":"https://registry.npmjs.org/harmony-collections/-/harmony-collections-0.3.6.tgz","integrity":"sha512-dgTEEmcLrIIjE2xgDxHWBPF5iVot1z8dwJRY6Rr8pqRJ+khB2xmLMGv/0eqnAd/1iw9Ip5EcV8noqfBIf9qqag==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAmttGQbdn2Tb0hbOkravKVNUPSxacB8PjQmF9TNti26AiB5LoOPuIph9TniO9S/7D+/IntSCeMVeVRsUxXjyrsK8Q=="}]},"_npmVersion":"1.1.61","_npmUser":{"name":"benvie","email":"brandon@bbenvie.com"},"maintainers":[{"name":"benvie","email":"brandon@bbenvie.com"}]},"0.3.7":{"author":{"name":"Brandon Benvie","email":"http://bbenvie.com"},"name":"harmony-collections","description":"Shim to provide Map, Set, and WeakMap if they're not available, with non-leaky O(1) lookup WeakMaps","keywords":["harmony","collection","weakmap","map","set","ecmascript","es6","shim","garbage collection","gc"],"version":"0.3.7","homepage":"http://benvie.github.com/harmony-collections","repository":{"type":"git","url":"https://github.com/Benvie/harmony-collections"},"main":"harmony-collections.js","dependencies":{},"devDependencies":{"tap":"*"},"license":"MIT","readme":"# Harmony Collections Shim\n\nUse the new __Map__, __Set__, and __WeakMap__ from the upcoming ES6 standard right now! This shim provides full functionality for these collections and delivers the benefits of using them.\n\n## Compatability\n\nWorks with IE9+, Chrome, Firefox, Safari, untested in Opera. __IE8 support has been recently added but is experimental.__\n\n## Install/Use\n\nIf using node, install via:\n\n    npm install harmony-collections\n\nIn the browser, include __harmony-collection.js__ or __harmony-collections.min.js__ and Map, WeakMap, Set, and HashMap will be exposed on the window. (you can also define `window.exports` which will cause them to end up there).\n\n## Overview\n\nES6 Collections provide a new core weapon to your JS arsenal: objects as keys. This allows you to do the following awesome things: store private data \"on\" public objects, private properties, secretly \"tag\" objects, namespace properties, access controlled properties, check object uniqueness in `O(1)` time complexity.\n\n### WeakMap Garbage Collection Semantics\n\nThe benefit of using WeakMaps is enhanced garbage collection. In a WeakMap, the only reference created is key -> value, so it's possible for a key/value in a WeakMap to be garbage collected while the WeakMap they're in still exists! Compare this to an Array, where all items in the Array will not be garbage collected as long as the Array isn't. This forces either explicit management of  object lifespans or, more commonly, simply results in memory leaks.\n\nFor example, data stored using jQuery.data can never be garbage collected unless explicitly nulled out, because it is stored in a container that strongly references the items held inside. Using a WeakMap, it's possible to associate data with an element and have the data destroyed when the element is -- without memory leaking the element; i.e. `weakmap.set(element, { myData: 'gc safe!' })`. jQuery.data (every library has similar functionality) prevents the *element* from memory leaking by using a numeric id, but this does nothing for the __data__ that is stored.\n\n## Detailed Examples\n\n### Map/WeakMap\n```javascript\n// reusable storage creator\nfunction createStorage(){\n  var store = new WeakMap;\n  return function(o){\n    var v = store.get(o);\n    if (!v) store.set(o, v = {});\n    return v;\n  };\n}\n\n// allows private/namespaced properties for the objects\nvar _ = createStorage();\n\nfunctioon Wrapper(element){\n  var _element = _(element);\n  if (_element.wrapper)\n    return _element.wrapper;\n\n  _element.wrapper = this;\n  _(this).element = element;\n}\n\nWrapper.prototype = {\n  get classes(){\n    return [].slice.call(_(this).element.classList);\n  },\n  set classes(v){\n    _(this).element.className = [].concat(v).join(' ');\n  }\n};\n```\n\n### Set\nA Set is similar to an Array in what it stores, but different in how. A Set's values are unique. Determining whether an item is in a Set is `O(1)` but `O(n)` for an Array. An example of where this is useful is in implementing `Array.prototype.unique` that works with objects.\n\nBoth of the following will output the same result, however the Set version is `O(n)` and the one using indexOf is `O(n^2)`. For an array taking 30 seconds using the set, an __*hour*__ is required for indexOf.\n\n```javascript\nfunction uniqueUsingIndexOf(array){\n  return array.filter(function(item, index){\n    return array.lastIndexOf(item) > index;\n  });\n}\n\nfunction uniqueUsingSet(array){\n  var seen = new Set;\n  return array.filter(function(item){\n    if (!seen.has(item)) {\n      seen.add(item);\n      return true;\n    }\n  });\n}\n```\n\n\n## API Reference\n\n* Collections may be inherited from. Initialize objects via `[WeakMap|Map|Set].call(obj)`.\n* Iteration is insertion ordered.\n\n\n### WeakMap\n\n__Non-primitives__ are valid keys. Objects, functions, DOM nodes, etc.\n\nWeakMaps require the use of objects as keys; primitives are not valid keys. WeakMaps have no way to enumerate their keys or values. Because of this, the only way to retrieve a value from a WeakMap is to have access to both the WeakMap itself as well as an object used as a key.\n\n* `new WeakMap(iterable)` Create a new WeakMap populated with the iterable. Accepts *[[Key, Value]...]*, *Array*, *Iterable*.\n* `WeakMap#set(key, value)` Key must be non-primitive. Returns undefined.\n* `WeakMap#get(key)` Returns the value that key corresponds to the key or undefined.\n* `WeakMap#has(key)` Returns boolean.\n* `WeakMap#delete(key)` Removes the value from the collection and returns boolean indicating if there was a value to delete.\n\n\n### HashMap\n\n__Primitives__ are valid keys. Exact value is used; e.g. `'0'/-0/0` are all different keys.\n\nHashMap is not standard, but is used to implement Map and is exported as a bonus. Has the same API as Map except it only allows primitive keys.\n\n* `new HashMap(iterable)` Create a new HashMap populated with the iterable. Accepts *[[Key, Value]...]*, *Iterable*.\n* `HashMap#set(key, value)` Key must be primitive. Returns undefined.\n* `HashMap#get(key)` Returns the value the key corresponds to or undefined.\n* `HashMap#has(key)` Returns boolean.\n* `HashMap#delete(key)` Removes the value from the collection and returns boolean indicating if there was a value to delete.\n* `HashMap#size()` Returns the number of items in the collection.\n* `HashMap#forEach(callback, context)` Loop through the collection raising callback for each.\n\n\n### Map\n\n__All possible values__ are valid keys, including -0, undefined, null, and NaN.\n\nMaps do not have the same garbage collection benefits that WeakMaps do, but instead are iterable and also accept primitive keys. This means any value can be a Map key.\n\n* `new Map(iterable)` Create a new Map populated with the iterable. Accepts *[[Key, Value]...]*, *Array*, *Iterable*.\n* `Map#set(key, value)` Key is any value including objects. Returns undefined.\n* `Map#get(key)` Returns the value the key maps to or undefined.\n* `Map#has(key)` Returns boolean.\n* `Map#delete(key)` Removes the key and value from the collection if found. Returns true.\n* `Map#size()` Returns the number of items in the collection.\n* `Map#forEach(callback, context)` Loop through the collection raising callback for each.\n\n\n### Set\n\nSets are similar to arrays but enforce uniqueness of values. Adding the same value twice will only result in one being added to the set.\n\n* `new Set(iterable)` Create a new Set populated with the iterable. Accepts *Array*, *Iterable*.\n* `Set#add(value)` Inserts a value of any type into the set if it's not already in the set.\n* `Set#has(value)` Returns boolean.\n* `Set#delete(value)` Removes the value from the collection and returns boolean indicating if there was a value to delete.\n* `Set#size()` Returns the number of items in the collection.\n* `Set#forEach(callback, context)` Loop through the collection raising callback for each.\n\n\n\n## License\n\n(The MIT License)\nCopyright (c) 2012 Brandon Benvie <http://bbenvie.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files\n(the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge,\npublish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included with all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE\nFOR ANY  CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH\nTHE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","_id":"harmony-collections@0.3.7","dist":{"shasum":"3bc05ec1c3af796daa40b23245d33cc36f812d50","tarball":"https://registry.npmjs.org/harmony-collections/-/harmony-collections-0.3.7.tgz","integrity":"sha512-Fipota60rOPE85R1hkHDfooW37mjVGNgeguy3V+R4Req9tqHdoEn8UYJNJGlqKfEZeZ6lnw0ajJnP+DYVkTd3w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC/7OL38Nk1iqR+8y+GmZuQpuuNTa1WlXPj6/7m+1QzeAiEA3QnU+KwELX4+NiTbvQJL7bE1kKb+JHnvOQoqPig1wJY="}]},"_npmVersion":"1.1.61","_npmUser":{"name":"benvie","email":"brandon@bbenvie.com"},"maintainers":[{"name":"benvie","email":"brandon@bbenvie.com"}]},"0.3.8":{"author":{"name":"Brandon Benvie","email":"http://bbenvie.com"},"name":"harmony-collections","description":"Shim to provide Map, Set, and WeakMap if they're not available, with non-leaky O(1) lookup WeakMaps","keywords":["harmony","collection","weakmap","map","set","ecmascript","es6","shim","garbage collection","gc"],"version":"0.3.8","homepage":"http://benvie.github.com/harmony-collections","repository":{"type":"git","url":"https://github.com/Benvie/harmony-collections"},"main":"harmony-collections.js","dependencies":{},"devDependencies":{"tap":"*"},"license":"MIT","readme":"# Harmony Collections Shim\n\nUse the new __Map__, __Set__, and __WeakMap__ from the upcoming ES6 standard right now! This shim provides full functionality for these collections and delivers the benefits of using them.\n\n## Compatability\n\nWorks with IE9+, Chrome, Firefox, Safari, untested in Opera. __IE8 support has been recently added but is experimental.__\n\n## Install/Use\n\nIf using node, install via:\n\n    npm install harmony-collections\n\nIn the browser, include __harmony-collection.js__ or __harmony-collections.min.js__ and Map, WeakMap, Set, and HashMap will be exposed on the window. (you can also define `window.exports` which will cause them to end up there).\n\n## Overview\n\nES6 Collections provide a new core weapon to your JS arsenal: objects as keys. This allows you to do the following awesome things: store private data \"on\" public objects, private properties, secretly \"tag\" objects, namespace properties, access controlled properties, check object uniqueness in `O(1)` time complexity.\n\n### WeakMap Garbage Collection Semantics\n\nThe benefit of using WeakMaps is enhanced garbage collection. In a WeakMap, the only reference created is key -> value, so it's possible for a key/value in a WeakMap to be garbage collected while the WeakMap they're in still exists! Compare this to an Array, where all items in the Array will not be garbage collected as long as the Array isn't. This forces either explicit management of  object lifespans or, more commonly, simply results in memory leaks.\n\nFor example, data stored using jQuery.data can never be garbage collected unless explicitly nulled out, because it is stored in a container that strongly references the items held inside. Using a WeakMap, it's possible to associate data with an element and have the data destroyed when the element is -- without memory leaking the element; i.e. `weakmap.set(element, { myData: 'gc safe!' })`. jQuery.data (every library has similar functionality) prevents the *element* from memory leaking by using a numeric id, but this does nothing for the __data__ that is stored.\n\n## Detailed Examples\n\n### Map/WeakMap\n```javascript\n// reusable storage creator\nfunction createStorage(){\n  var store = new WeakMap;\n  return function(o){\n    var v = store.get(o);\n    if (!v) store.set(o, v = {});\n    return v;\n  };\n}\n\n// allows private/namespaced properties for the objects\nvar _ = createStorage();\n\nfunctioon Wrapper(element){\n  var _element = _(element);\n  if (_element.wrapper)\n    return _element.wrapper;\n\n  _element.wrapper = this;\n  _(this).element = element;\n}\n\nWrapper.prototype = {\n  get classes(){\n    return [].slice.call(_(this).element.classList);\n  },\n  set classes(v){\n    _(this).element.className = [].concat(v).join(' ');\n  }\n};\n```\n\n### Set\nA Set is similar to an Array in what it stores, but different in how. A Set's values are unique. Determining whether an item is in a Set is `O(1)` but `O(n)` for an Array. An example of where this is useful is in implementing `Array.prototype.unique` that works with objects.\n\nBoth of the following will output the same result, however the Set version is `O(n)` and the one using indexOf is `O(n^2)`. For an array taking 30 seconds using the set, an __*hour*__ is required for indexOf.\n\n```javascript\nfunction uniqueUsingIndexOf(array){\n  return array.filter(function(item, index){\n    return array.lastIndexOf(item) > index;\n  });\n}\n\nfunction uniqueUsingSet(array){\n  var seen = new Set;\n  return array.filter(function(item){\n    if (!seen.has(item)) {\n      seen.add(item);\n      return true;\n    }\n  });\n}\n```\n\n\n## API Reference\n\n* Collections may be inherited from. Initialize objects via `[WeakMap|Map|Set].call(obj)`.\n* Iteration is insertion ordered.\n\n\n### WeakMap\n\n__Non-primitives__ are valid keys. Objects, functions, DOM nodes, etc.\n\nWeakMaps require the use of objects as keys; primitives are not valid keys. WeakMaps have no way to enumerate their keys or values. Because of this, the only way to retrieve a value from a WeakMap is to have access to both the WeakMap itself as well as an object used as a key.\n\n* `new WeakMap(iterable)` Create a new WeakMap populated with the iterable. Accepts *[[Key, Value]...]*, *Array*, *Iterable*.\n* `WeakMap#set(key, value)` Key must be non-primitive. Returns undefined.\n* `WeakMap#get(key)` Returns the value that key corresponds to the key or undefined.\n* `WeakMap#has(key)` Returns boolean.\n* `WeakMap#delete(key)` Removes the value from the collection and returns boolean indicating if there was a value to delete.\n\n\n### HashMap\n\n__Primitives__ are valid keys. Exact value is used; e.g. `'0'/-0/0` are all different keys.\n\nHashMap is not standard, but is used to implement Map and is exported as a bonus. Has the same API as Map except it only allows primitive keys.\n\n* `new HashMap(iterable)` Create a new HashMap populated with the iterable. Accepts *[[Key, Value]...]*, *Iterable*.\n* `HashMap#set(key, value)` Key must be primitive. Returns undefined.\n* `HashMap#get(key)` Returns the value the key corresponds to or undefined.\n* `HashMap#has(key)` Returns boolean.\n* `HashMap#delete(key)` Removes the value from the collection and returns boolean indicating if there was a value to delete.\n* `HashMap#size()` Returns the number of items in the collection.\n* `HashMap#forEach(callback, context)` Loop through the collection raising callback for each.\n\n\n### Map\n\n__All possible values__ are valid keys, including -0, undefined, null, and NaN.\n\nMaps do not have the same garbage collection benefits that WeakMaps do, but instead are iterable and also accept primitive keys. This means any value can be a Map key.\n\n* `new Map(iterable)` Create a new Map populated with the iterable. Accepts *[[Key, Value]...]*, *Array*, *Iterable*.\n* `Map#set(key, value)` Key is any value including objects. Returns undefined.\n* `Map#get(key)` Returns the value the key maps to or undefined.\n* `Map#has(key)` Returns boolean.\n* `Map#delete(key)` Removes the key and value from the collection if found. Returns true.\n* `Map#size()` Returns the number of items in the collection.\n* `Map#forEach(callback, context)` Loop through the collection raising callback for each.\n\n\n### Set\n\nSets are similar to arrays but enforce uniqueness of values. Adding the same value twice will only result in one being added to the set.\n\n* `new Set(iterable)` Create a new Set populated with the iterable. Accepts *Array*, *Iterable*.\n* `Set#add(value)` Inserts a value of any type into the set if it's not already in the set.\n* `Set#has(value)` Returns boolean.\n* `Set#delete(value)` Removes the value from the collection and returns boolean indicating if there was a value to delete.\n* `Set#size()` Returns the number of items in the collection.\n* `Set#forEach(callback, context)` Loop through the collection raising callback for each.\n\n\n\n## License\n\n(The MIT License)\nCopyright (c) 2012 Brandon Benvie <http://bbenvie.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files\n(the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge,\npublish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included with all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE\nFOR ANY  CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH\nTHE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","_id":"harmony-collections@0.3.8","dist":{"shasum":"bd2b186db808e32182121f3400abd16f2208b32a","tarball":"https://registry.npmjs.org/harmony-collections/-/harmony-collections-0.3.8.tgz","integrity":"sha512-2b5WkpPhYFz9JMAcJZTBEDClDoicR483zW21wEQWPR16agtXAHAZYW8XLr8yUjTO3Vnow0h1PDPSmyCHxwNuDQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCwYFJOK+uoMxqhKbeX36Ea9mZTitKBXvvUFjf1nOPtnwIhALAfIGyADirOLUmf0BwXD5KxWMfQd9DCHaZBI4yVWY4O"}]},"_npmVersion":"1.1.61","_npmUser":{"name":"benvie","email":"brandon@bbenvie.com"},"maintainers":[{"name":"benvie","email":"brandon@bbenvie.com"}]}},"readme":null,"maintainers":[{"name":"benvie","email":"brandon@bbenvie.com"}],"time":{"modified":"2022-06-18T19:22:53.198Z","created":"2011-12-15T21:57:14.065Z","0.0.1":"2011-12-15T21:57:14.819Z","0.0.2":"2011-12-15T22:11:45.242Z","0.0.3":"2011-12-15T22:33:32.850Z","0.0.4":"2011-12-15T23:08:05.405Z","0.0.5":"2011-12-16T01:08:04.343Z","0.0.6":"2011-12-16T01:57:30.452Z","0.0.7":"2011-12-16T02:21:07.638Z","0.0.8":"2011-12-16T03:13:57.415Z","0.0.9":"2011-12-16T04:22:50.705Z","0.1.0":"2011-12-16T21:40:28.653Z","0.1.1":"2011-12-17T21:18:10.358Z","0.1.2":"2011-12-21T11:54:00.082Z","0.1.3":"2011-12-25T22:12:58.850Z","0.1.4":"2011-12-26T07:54:59.119Z","0.1.5":"2011-12-26T07:59:41.746Z","0.1.6":"2011-12-27T22:11:04.791Z","0.1.7":"2011-12-27T22:27:00.839Z","0.1.8":"2011-12-27T22:29:08.308Z","0.2.0":"2011-12-27T22:41:59.118Z","0.2.1":"2012-05-03T09:51:19.309Z","0.2.2":"2012-05-03T09:55:38.741Z","0.2.3":"2012-05-03T14:35:47.930Z","0.2.4":"2012-05-03T23:01:13.500Z","0.2.5":"2012-05-07T04:00:02.092Z","0.2.6":"2012-05-09T06:17:14.917Z","0.2.9":"2012-06-25T00:27:54.687Z","0.3.1":"2012-09-23T22:06:37.375Z","0.3.2":"2012-09-23T22:07:26.768Z","0.3.3":"2012-09-23T22:34:42.985Z","0.3.4":"2012-09-24T12:54:20.728Z","0.3.5":"2012-09-24T13:04:02.839Z","0.3.6":"2012-09-25T18:23:44.750Z","0.3.7":"2012-09-28T18:58:17.451Z","0.3.8":"2012-11-09T03:30:35.898Z"},"author":{"name":"Brandon Benvie","email":"http://bbenvie.com"},"repository":{"type":"git","url":"https://github.com/Benvie/harmony-collections"},"users":{"eterna2":true}}