{"_id":"mixedtuplemap","_rev":"3-c564e73362608eea4053bf793d6e28ef","name":"mixedtuplemap","description":"A memory-efficient Map which accepts multiple objects as a key.","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"mixedtuplemap","version":"1.0.0","description":"A memory-efficient Map 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":"1e1a2ba16700cb5b5ff166d328b31890c844226c","_id":"mixedtuplemap@1.0.0","_shasum":"3bdad4a14a5478b9a3972aae56092772a759cfc4","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.6.0","_npmUser":{"name":"louisremi","email":"lrbabe@gmail.com"},"dist":{"shasum":"3bdad4a14a5478b9a3972aae56092772a759cfc4","tarball":"https://registry.npmjs.org/mixedtuplemap/-/mixedtuplemap-1.0.0.tgz","integrity":"sha512-UGFCainOZWD95W/zvGq1iJSpz6vRlB8UIAw/i17IhpdHxpIMG/68RXaQqGHvUGh+3GOoPOmhKjDv2OJ1uENDxA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBFbfcafHX7U+nioaFtcUf9q2WRhpoiLwz8p80htRgUzAiEAnl4+HJ8VkAaIQ6ZXeCAZUdm1onqlsTEuzWgnyCK0hjA="}]},"maintainers":[{"name":"louisremi","email":"lrbabe@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/mixedtuplemap-1.0.0.tgz_1482341151519_0.42454038211144507"}}},"readme":"MixedTupleMap [![npm version](https://badge.fury.io/js/mixedtuplemap.svg)](https://badge.fury.io/js/mixedtuplemap) [![Build Status](https://travis-ci.org/memoize-immutable/MixedTupleMap.svg?branch=master)](https://travis-ci.org/memoize-immutable/MixedTupleMap) [![Dependency Status](https://david-dm.org/memoize-immutable/MixedTupleMap.svg)](https://david-dm.org/memoize-immutable/MixedTupleMap) [![Coverage Status](https://coveralls.io/repos/github/memoize-immutable/MixedTupleMap/badge.svg?branch=master)](https://coveralls.io/github/memoize-immutable/MixedTupleMap?branch=master)\n=============\n\nA memory-efficient Map 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 MixedTupleMap`\n\nThis lib has no dependency, but requires a native implementation of WeakMap.\n\n## Usage\n\n**Restrictions**. This map should be used when:\n-\n\n```js\nvar MixedTupleMap = require('MixedTupleMap');\n\nvar cache = new MixedTupleMap();\n\nvar keyPart1 = {};\nvar keyPart2 = '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## When should you use this map?\n\nThis map is the best alternative to a WeakMap, when you need keys composed\nof multiple parts that mix primitive and non-primitive types. Note shouldn't be used if ALL parts\nof the key are likely to have primitive types\n(`number`, `string`, `boolean`, `undefined` or even `null`).\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-19T22:57:08.013Z","created":"2016-12-21T17:25:53.507Z","1.0.0":"2016-12-21T17:25:53.507Z"},"keywords":["cache","map","tuple"],"author":{"name":"@louis_remi"},"license":"MPL-2.0","readmeFilename":"README.md"}