{"_id":"weakmap-shim","_rev":"305026","name":"weakmap-shim","description":"A minimal weakmap shim","dist-tags":{"latest":"1.1.1"},"maintainers":[{"name":"raynos","email":""}],"time":{"modified":"2024-02-17T15:43:23.000Z","created":"2014-03-24T08:37:55.055Z","1.1.1":"2016-12-05T22:44:53.819Z","1.1.0":"2014-12-03T17:07:03.836Z","1.0.0":"2014-03-24T08:37:55.055Z"},"users":{},"author":{"name":"Raynos","email":"raynos2@gmail.com"},"repository":{"type":"git","url":"git://github.com/Raynos/weakmap-shim.git"},"versions":{"1.1.1":{"name":"weakmap-shim","version":"1.1.1","description":"A minimal weakmap shim","keywords":[],"author":{"name":"Raynos","email":"raynos2@gmail.com"},"repository":{"type":"git","url":"git://github.com/Raynos/weakmap-shim.git"},"main":"index","homepage":"https://github.com/Raynos/weakmap-shim","contributors":[{"name":"Raynos"}],"bugs":{"url":"https://github.com/Raynos/weakmap-shim/issues","email":"raynos2@gmail.com"},"dependencies":{},"devDependencies":{"tape":"~1.0.2","tap-spec":"~0.1.6"},"licenses":[{"type":"MIT","url":"http://github.com/Raynos/weakmap-shim/raw/master/LICENSE"}],"scripts":{"test":"node ./test/index.js | tap-spec","start":"node ./index.js","watch":"nodemon -w ./index.js index.js","travis-test":"istanbul cover ./test/index.js && ((cat coverage/lcov.info | coveralls) || exit 0)","cover":"istanbul cover --report none --print detail ./test/index.js","view-cover":"istanbul report html && google-chrome ./coverage/index.html","test-browser":"testem-browser ./test/browser/index.js","testem":"testem-both -b=./test/browser/index.js"},"testling":{"files":"test/index.js","browsers":["ie/8..latest","firefox/16..latest","firefox/nightly","chrome/22..latest","chrome/canary","opera/12..latest","opera/next","safari/5.1..latest","ipad/6.0..latest","iphone/6.0..latest","android-browser/4.2..latest"]},"gitHead":"e322e1912dd83811fb10a270a24e06202385e4a4","_id":"weakmap-shim@1.1.1","_shasum":"d65afd784109b2166e00ff571c33150ec2a40b49","_from":".","_npmVersion":"2.14.22","_nodeVersion":"0.10.32","_npmUser":{"name":"raynos","email":"raynos2@gmail.com"},"dist":{"shasum":"d65afd784109b2166e00ff571c33150ec2a40b49","size":3784,"noattachment":false,"key":"/weakmap-shim/-/weakmap-shim-1.1.1.tgz","tarball":"http://name.csiicloud.com:7001/weakmap-shim/download/weakmap-shim-1.1.1.tgz"},"maintainers":[{"name":"raynos","email":""}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/weakmap-shim-1.1.1.tgz_1480977891799_0.575514052528888"},"directories":{},"publish_time":1480977893819,"_hasShrinkwrap":false,"_cnpm_publish_time":1480977893819,"_cnpmcore_publish_time":"2021-12-16T19:33:59.509Z"},"1.1.0":{"name":"weakmap-shim","version":"1.1.0","description":"A minimal weakmap shim","keywords":[],"author":{"name":"Raynos","email":"raynos2@gmail.com"},"repository":{"type":"git","url":"git://github.com/Raynos/weakmap-shim.git"},"main":"index","homepage":"https://github.com/Raynos/weakmap-shim","contributors":[{"name":"Raynos"}],"bugs":{"url":"https://github.com/Raynos/weakmap-shim/issues","email":"raynos2@gmail.com"},"dependencies":{},"devDependencies":{"tape":"~1.0.2","tap-spec":"~0.1.6"},"licenses":[{"type":"MIT","url":"http://github.com/Raynos/weakmap-shim/raw/master/LICENSE"}],"scripts":{"test":"node ./test/index.js | tap-spec","start":"node ./index.js","watch":"nodemon -w ./index.js index.js","travis-test":"istanbul cover ./test/index.js && ((cat coverage/lcov.info | coveralls) || exit 0)","cover":"istanbul cover --report none --print detail ./test/index.js","view-cover":"istanbul report html && google-chrome ./coverage/index.html","test-browser":"testem-browser ./test/browser/index.js","testem":"testem-both -b=./test/browser/index.js"},"testling":{"files":"test/index.js","browsers":["ie/8..latest","firefox/16..latest","firefox/nightly","chrome/22..latest","chrome/canary","opera/12..latest","opera/next","safari/5.1..latest","ipad/6.0..latest","iphone/6.0..latest","android-browser/4.2..latest"]},"_id":"weakmap-shim@1.1.0","_shasum":"c8fd072e23bff1ffb59648467cdcaf0142d4db6e","_from":".","_npmVersion":"1.4.10","_npmUser":{"name":"raynos","email":"raynos2@gmail.com"},"maintainers":[{"name":"raynos","email":""}],"dist":{"shasum":"c8fd072e23bff1ffb59648467cdcaf0142d4db6e","size":3749,"noattachment":false,"key":"/weakmap-shim/-/weakmap-shim-1.1.0.tgz","tarball":"http://name.csiicloud.com:7001/weakmap-shim/download/weakmap-shim-1.1.0.tgz"},"directories":{},"publish_time":1417626423836,"_hasShrinkwrap":false,"_cnpm_publish_time":1417626423836,"_cnpmcore_publish_time":"2021-12-16T19:33:59.735Z"},"1.0.0":{"name":"weakmap-shim","version":"1.0.0","description":"A minimal weakmap shim","keywords":[],"author":{"name":"Raynos","email":"raynos2@gmail.com"},"repository":{"type":"git","url":"git://github.com/Raynos/weakmap-shim.git"},"main":"index","homepage":"https://github.com/Raynos/weakmap-shim","contributors":[{"name":"Raynos"}],"bugs":{"url":"https://github.com/Raynos/weakmap-shim/issues","email":"raynos2@gmail.com"},"dependencies":{},"devDependencies":{"tape":"~1.0.2","tap-spec":"~0.1.6"},"licenses":[{"type":"MIT","url":"http://github.com/Raynos/weakmap-shim/raw/master/LICENSE"}],"scripts":{"test":"node ./test/index.js | tap-spec","start":"node ./index.js","watch":"nodemon -w ./index.js index.js","travis-test":"istanbul cover ./test/index.js && ((cat coverage/lcov.info | coveralls) || exit 0)","cover":"istanbul cover --report none --print detail ./test/index.js","view-cover":"istanbul report html && google-chrome ./coverage/index.html","test-browser":"testem-browser ./test/browser/index.js","testem":"testem-both -b=./test/browser/index.js"},"testling":{"files":"test/index.js","browsers":["ie/8..latest","firefox/16..latest","firefox/nightly","chrome/22..latest","chrome/canary","opera/12..latest","opera/next","safari/5.1..latest","ipad/6.0..latest","iphone/6.0..latest","android-browser/4.2..latest"]},"_id":"weakmap-shim@1.0.0","dist":{"shasum":"36db04b4c163612e6c4dd94971444a227caef34c","size":3460,"noattachment":false,"key":"/weakmap-shim/-/weakmap-shim-1.0.0.tgz","tarball":"http://name.csiicloud.com:7001/weakmap-shim/download/weakmap-shim-1.0.0.tgz"},"_from":".","_npmVersion":"1.3.22","_npmUser":{"name":"raynos","email":"raynos2@gmail.com"},"maintainers":[{"name":"raynos","email":""}],"directories":{},"publish_time":1395650275055,"_hasShrinkwrap":false,"_cnpm_publish_time":1395650275055,"_cnpmcore_publish_time":"2021-12-16T19:33:59.925Z"}},"readme":"# weakmap-shim\n\n<!--\n    [![build status][1]][2]\n    [![NPM version][3]][4]\n    [![Coverage Status][5]][6]\n    [![gemnasium Dependency Status][7]][8]\n    [![Davis Dependency status][9]][10]\n-->\n\n<!-- [![browser support][11]][12] -->\n\nA minimal weakmap shim\n\n## Example\n\n```js\nvar weakMap = require(\"weakmap-shim\")\n\nvar map = weakMap()\nvar key = {}\n\nmap.set(key, 'some value')\nvar v = map.get(key) // 'some value'\n```\n\n## create-store Example\n\n```js\nvar createStore = require('weakmap-shim/create-store')\n\nvar store = createStore()\nvar key = {}\n\nvar value = store(key)\n\n// `value` is weakly bound to `key`. `value` is a plain object\nvalue.foo = 'bar'\n\nvar value2 = store(key)\n\nvar v = value2.foo; // 'bar'\nvar bool = value === value2; // true\n```\n\n## Motivation\n\nBenvie has an excellent [weakmap](https://github.com/Benvie/WeakMap)\n  module that's far more robust. However it contains quite a bit\n  of loc.\n\n - `weakmap` : 7451 bytes\n - `weakmap-shim` : 2106 bytes\n - `weakmap-shim/create-store` : 1311 bytes\n\nThis module is only worthwhile if you want to add a weakmap to \n  a small module (10 - 30 loc) and dont want to bloat it with\n  a heavier weakmap\n\n## Installation\n\n`npm install weakmap-shim`\n\n## Contributors\n\n - Raynos\n\n## MIT Licenced\n\n  [1]: https://secure.travis-ci.org/Raynos/weakmap-shim.png\n  [2]: https://travis-ci.org/Raynos/weakmap-shim\n  [3]: https://badge.fury.io/js/weakmap-shim.png\n  [4]: https://badge.fury.io/js/weakmap-shim\n  [5]: https://coveralls.io/repos/Raynos/weakmap-shim/badge.png\n  [6]: https://coveralls.io/r/Raynos/weakmap-shim\n  [7]: https://gemnasium.com/Raynos/weakmap-shim.png\n  [8]: https://gemnasium.com/Raynos/weakmap-shim\n  [9]: https://david-dm.org/Raynos/weakmap-shim.png\n  [10]: https://david-dm.org/Raynos/weakmap-shim\n  [11]: https://ci.testling.com/Raynos/weakmap-shim.png\n  [12]: https://ci.testling.com/Raynos/weakmap-shim\n","_attachments":{},"homepage":"https://github.com/Raynos/weakmap-shim","bugs":{"url":"https://github.com/Raynos/weakmap-shim/issues","email":"raynos2@gmail.com"}}