{"dist":{"shasum":"f1dc9b547ec4984e31f4c5804a453cb3f3bbe465","tarball":"https://registry.npmjs.org/stringmap/-/stringmap-0.1.0.tgz","integrity":"sha512-37GzN3yamJhY8uELCMBnJAGSsNZCY8441vMwEzQkSNMC0yZlP6GTGL5q67iGXPVddyEdBxkHlYilAY7dOcFwEA==","signatures":[{"sig":"MEYCIQDHlnt+JsLRmIoEW3YXCqKcH9SC0gQ3hFjW6OTKmr2gMgIhAOUzEppmpI0NcRn8jHuAzGaCDvQ6VjrLtYdiNHbYmqLj","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"stringmap.js","name":"stringmap","_from":".","author":{"name":"Olov Lassus","email":"olov.lassus@gmail.com"},"readme":"# stringmap.js\nA fast and robust stringmap implementation that can hold any string keys,\nincluding `__proto__`, with minimal overhead compared to a plain object.\nWorks in node and browsers.\n\n\n\n## Examples\nAvailable in `examples.js`\n\n```javascript\nvar StringMap = require(\"./stringmap\");\n\nvar sm1 = new StringMap();\nsm1.set(\"greeting\", \"yoyoma\");\nsm1.set(\"check\", true);\nsm1.set(\"__proto__\", -1);\nconsole.log(sm1.has(\"greeting\")); // true\nconsole.log(sm1.get(\"__proto__\")); // -1\nsm1.delete(\"greeting\");\nconsole.log(sm1.keys()); // [ 'check', '__proto__' ]\nconsole.log(sm1.values()); // [ true, -1 ]\nconsole.log(sm1.items()); // [ [ 'check', true ], [ '__proto__', -1 ] ]\nconsole.log(sm1.toString()); // {\"check\":true,\"__proto__\":-1}\n\nvar sm2 = new StringMap({\n    one: 1,\n    two: 2,\n});\nconsole.log(sm2.map(function(value, key) {\n    return value * value;\n})); // [ 1, 4 ]\nsm2.forEach(function(value, key) {\n    // ...\n});\nconsole.log(sm2.isEmpty()); // false\nconsole.log(sm2.size()); // 2\n\nvar sm3 = sm1.clone();\nsm3.merge(sm2);\nsm3.setMany({\n    a: {},\n    b: [],\n});\nconsole.log(sm3.toString()); // {\"check\":true,\"one\":1,\"two\":2,\"a\":{},\"b\":[],\"__proto__\":-1}\n```\n\n\n\n## Installation\n\n### Node\nInstall using npm\n\n    npm install stringmap\n\n```javascript\nvar StringMap = require(\"stringmap\");\n```\n\n### Browser\nClone the repo, include it in a script tag. You may want an ES5 polyfill.\n\n    git clone https://github.com/olov/stringmap.git\n\n```html\n<script src=\"stringmap/stringmap.js\"></script>\n```\n","license":"MIT","_npmUser":{"name":"olov","email":"olov.lassus@gmail.com"},"keywords":["stringmap","hashmap","hash","dict","dictionary","__proto__"],"repository":{"url":"https://github.com/olov/stringmap.git","type":"git"},"_npmVersion":"1.2.18","description":"fast and robust stringmap","maintainers":[{"name":"olov","email":"olov.lassus@gmail.com"}],"readmeFilename":"README.md","_id":"stringmap@0.1.0","version":"0.1.0"}