{"_id":"weaktuplemap","_rev":"3-8ffc1b1ad3ed9d69ad3a97b4ec70b5c0","name":"weaktuplemap","description":"A WeakMap which accepts multiple objects as a key","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"weaktuplemap","version":"1.0.0","description":"A WeakMap which accepts multiple objects as a key","main":"dist/index.js","jsnext:main":"index.js","scripts":{"lint":"eslint ./index.js ./__tests__","coverage":"jest --coverage && cat ./coverage/lcov.info | coveralls","test":"jest --coverage && npm run lint","clean":"rimraf dist/ && mkdir dist/","build":"npm test && npm run clean && babel index.js --out-file dist/index.js --source-maps"},"keywords":["cache","map","tuple"],"author":{"name":"@louis_remi"},"license":"MPL-2.0","devDependencies":{"babel-cli":"^6.18.0","babel-jest":"^17.0.2","babel-plugin-add-module-exports":"^0.2.1","babel-preset-es2015":"^6.18.0","coveralls":"^2.11.15","eslint":"^3.12.2","jest":"^17.0.3","rimraf":"^2.5.4"},"gitHead":"5a794788b942ac148d30cbfc0e2b8b313a0b3f35","_id":"weaktuplemap@1.0.0","_shasum":"fcdb27e395c3054bce3a4f3518d61a4ab8168d3b","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.6.0","_npmUser":{"name":"louisremi","email":"lrbabe@gmail.com"},"dist":{"shasum":"fcdb27e395c3054bce3a4f3518d61a4ab8168d3b","tarball":"https://registry.npmjs.org/weaktuplemap/-/weaktuplemap-1.0.0.tgz","integrity":"sha512-a6vAn4vQ0qjQ6nvX1shOJKtLrzWSoOXhH9Y4g+wboSkN0vyJQu+BPHFdWZeruHpY4e4sYmn8x+Q6mcl+S8YC0g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFiQLiIsNFs0nqQ0b9/UOtI5rjSwMLspET13+ZksT54gAiEA0X4nVMcQs9+Bhx03fdx57+wjpaKU4+2ojI/ScCt5M3U="}]},"maintainers":[{"name":"louisremi","email":"lrbabe@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/weaktuplemap-1.0.0.tgz_1482341260281_0.26916331402026117"}}},"readme":"WeakTupleMap [![npm version](https://badge.fury.io/js/weaktuplemap.svg)](https://badge.fury.io/js/weaktuplemap) [![Build Status](https://travis-ci.org/memoize-immutable/WeakTupleMap.svg?branch=master)](https://travis-ci.org/memoize-immutable/WeakTupleMap) [![Dependency Status](https://david-dm.org/memoize-immutable/WeakTupleMap.svg)](https://david-dm.org/memoize-immutable/WeakTupleMap) [![Coverage Status](https://coveralls.io/repos/github/memoize-immutable/WeakTupleMap/badge.svg?branch=master)](https://coveralls.io/github/memoize-immutable/WeakTupleMap?branch=master)\n============\n\nA WeakMap which accepts multiple objects as a key.\nThis lib is one of the several possible cache for [memoize-immutable](/louisremi/memoize-immutable),\nbut it can suit other use-cases as it implements a usual Map API.\n\n## Install\n\n`npm install --save WeakTupleMap`\n\nThis lib has no dependency, but requires a native implementation of WeakMap.\n\n## Usage\n\n**Restrictions**. A WeakTupleMap can only be used when:\n  - The key is only made of parts that have a non-primitive type\n    (`object`, `array`, or `function`).\n  - The key always has the same number of parts.\n\n```js\nvar WeakTupleMap = require('WeakTupleMap');\n\nvar cache = new WeakTupleMap();\n\nvar keyPart1 = {};\nvar keyPart2 = function() { return 'yolo'; };\nvar keyPart3 = [];\nvar value = {any: 'thing'};\n\n// Note that following keyPart tuples are wrapped in new arrays that are !==\n// (otherwise a WeakMap would have been enough).\ncache.set([keyPart1, keyPart2, keyPart3], value);\n\ncache.has([keyPart1, keyPart2, keyPart3]) === true;\ncache.get([keyPart1, keyPart2, keyPart3]) === value;\n```\n\n## Author\n\n[@louis_remi](https://twitter.com/louis_remi)\n\n## License\n\nMPL-2.0\n","maintainers":[{"name":"louisremi","email":"lrbabe@gmail.com"}],"time":{"modified":"2022-06-28T22:37:09.040Z","created":"2016-12-21T17:27:40.909Z","1.0.0":"2016-12-21T17:27:40.909Z"},"keywords":["cache","map","tuple"],"author":{"name":"@louis_remi"},"license":"MPL-2.0","readmeFilename":"README.md"}