{"_id":"2keys","_rev":"4-8b73758773659ccee6f80a4943088d8f","name":"2keys","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0":{"name":"2keys","version":"1.0.0","description":"Alternate and slightly faster implementation of [map2](https://www.npmjs.com/package/map2) and [set2](https://www.npmjs.com/package/set2) allowing you to use more than one key as the key","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"github.com/BlobTheKat/2keys"},"type":"module","keywords":["map","es6","map2","tuple","set","set2"],"author":"","license":"MIT","_id":"2keys@1.0.0","gitHead":"37fd81c0b6aebb25c2dd22f0d973c58eb614470a","_nodeVersion":"20.10.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-MLErFU+bXSKJCgcAuYAInPMrlLXifKtrNpHDM2ipDvsbvtdy52thIuM+STf3T4N5llR/yOMI1piO9MUBjS8jHg==","shasum":"8b9936d320d36f8c5c6ccfbb962dece2f7f7a955","tarball":"https://registry.npmjs.org/2keys/-/2keys-1.0.0.tgz","fileCount":3,"unpackedSize":6341,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICZy0ITj3+klkWuKC1cjGf81UqNcfWjs3IBb7SmmgX2fAiAhs/6UCkjgGZhk8CLsyN1bMxvXy+lQbgrcN9+T0pArXA=="}]},"_npmUser":{"name":"blobkat","email":"blob.kat@hotmail.com"},"directories":{},"maintainers":[{"name":"blobkat","email":"blob.kat@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/2keys_1.0.0_1703172023693_0.6174406141141429"},"_hasShrinkwrap":false},"1.0.1":{"name":"2keys","version":"1.0.1","description":"Alternate and slightly faster implementation of [map2](https://www.npmjs.com/package/map2) and [set2](https://www.npmjs.com/package/set2) allowing you to use more than one key as the key","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"github.com/BlobTheKat/2keys"},"keywords":["map","es6","map2","tuple","set","set2","keys","hashmap","hashset"],"author":"","license":"MIT","_id":"2keys@1.0.1","gitHead":"37fd81c0b6aebb25c2dd22f0d973c58eb614470a","_nodeVersion":"20.10.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-D+2V2UScJ/TujzchYX0cbCSxEKSoQwVNT4dCEKKea0M3pNJg/FRGmCu4xAOrk4tvUQie2udkH2cOz1QIL12+cw==","shasum":"33c11108891e4e1ca41b9051a2f22913e630925b","tarball":"https://registry.npmjs.org/2keys/-/2keys-1.0.1.tgz","fileCount":3,"unpackedSize":7347,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHQDxFNLQnRN10aKMDnjSioA5+s8ADeZUUQhshs18zX3AiEAj0in1iK6U8i6gEiirtGtJkHEQ//cbzc9Tv2BqOpP/S4="}]},"_npmUser":{"name":"blobkat","email":"blob.kat@hotmail.com"},"directories":{},"maintainers":[{"name":"blobkat","email":"blob.kat@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/2keys_1.0.1_1703173590311_0.5249085225412022"},"_hasShrinkwrap":false},"1.0.2":{"name":"2keys","version":"1.0.2","description":"Alternate and slightly faster implementation of [map2](https://www.npmjs.com/package/map2) and [set2](https://www.npmjs.com/package/set2) allowing you to use more than one key as the key","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"github.com/BlobTheKat/2keys"},"keywords":["map","es6","map2","tuple","set","set2","keys","hashmap","hashset"],"author":"","license":"MIT","_id":"2keys@1.0.2","gitHead":"5ffd7f6638985121d6fdfd74b1799fd3c1ba3ef0","_nodeVersion":"20.10.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-lzoH86LzwGAUIr8UBkVU8FRwvbSh4MBJ+379EB6MPf/FPPCz7whmTJOcdj/Sg4U80iXzGFMZRabbof3dEKcfWw==","shasum":"2bc17b939f6a766e3791d06ba498a4da4bc774f5","tarball":"https://registry.npmjs.org/2keys/-/2keys-1.0.2.tgz","fileCount":3,"unpackedSize":7351,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA9qdGRMMPSgpiwvRW0+4aHZyESba8/vF30BxO9t5ZXPAiEAryGVH/Y9Xejb3TOM4cNuZnye/m0RVHiQttMTKC68ZJY="}]},"_npmUser":{"name":"blobkat","email":"blob.kat@hotmail.com"},"directories":{},"maintainers":[{"name":"blobkat","email":"blob.kat@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/2keys_1.0.2_1703175461660_0.5838066024821815"},"_hasShrinkwrap":false},"1.0.3":{"name":"2keys","version":"1.0.3","description":"Alternate and slightly faster implementation of [map2](https://www.npmjs.com/package/map2) and [set2](https://www.npmjs.com/package/set2) allowing you to use more than one key as the key","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"github.com/BlobTheKat/2keys"},"keywords":["map","es6","map2","tuple","set","set2","keys","hashmap","hashset"],"author":"","license":"MIT","_id":"2keys@1.0.3","gitHead":"a135ab760a9eda6952c18ad870a92c2c88084c96","_nodeVersion":"20.10.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-TdTckyhEwLvHJm/mJWuNp4+rA2zLOU3m8S46aqFuzovBghWP7akMHDaGPKqRyKhFHw5EhwwQR4XsIgU/B2QXMQ==","shasum":"69889627e38ddea23cc68f7148c681a8ca66ca43","tarball":"https://registry.npmjs.org/2keys/-/2keys-1.0.3.tgz","fileCount":3,"unpackedSize":7373,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDrf0K9NaxEk4WFM7ZBV6+6d3Y/w2USiPTqf0RHSPozXwIgFeLvZBac345RoZCxCbFhckS7IPqmmMlWozn51EmVtoI="}]},"_npmUser":{"name":"blobkat","email":"blob.kat@hotmail.com"},"directories":{},"maintainers":[{"name":"blobkat","email":"blob.kat@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/2keys_1.0.3_1703284281340_0.7092758661729268"},"_hasShrinkwrap":false},"1.1.0":{"name":"2keys","version":"1.1.0","description":"Alternate and slightly faster implementation of [map2](https://www.npmjs.com/package/map2) and [set2](https://www.npmjs.com/package/set2) allowing you to use more than one key as the key","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"github.com/BlobTheKat/2keys"},"keywords":["map","es6","map2","tuple","set","set2","keys","hashmap","hashset"],"author":"","license":"MIT","_id":"2keys@1.1.0","gitHead":"d73ca6367d01916044d262be1f8e4f6d61719f5b","_nodeVersion":"20.10.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-O9Lb+kIjXFVzwQK1mCRvVGyNoXy/5V/yYbPw/M/X803ISho5m7IkzW60CePL6yUTwATihYWEKRB7JHyPgxCvnQ==","shasum":"4ff18bdb407d45d591ff05e9228b1628e413086e","tarball":"https://registry.npmjs.org/2keys/-/2keys-1.1.0.tgz","fileCount":3,"unpackedSize":7373,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDqR3LGTJrCGZ3HMNGZIyYbJ+60rsZjzthzqPz1L8pS8gIgRQyu+Eq+pZj8usopJ7nW4KHMGnxxWBAbuHDWVi2yoks="}]},"_npmUser":{"name":"blobkat","email":"blob.kat@hotmail.com"},"directories":{},"maintainers":[{"name":"blobkat","email":"blob.kat@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/2keys_1.1.0_1703284404060_0.07400498896684282"},"_hasShrinkwrap":false}},"time":{"created":"2023-12-21T15:20:23.692Z","1.0.0":"2023-12-21T15:20:23.853Z","modified":"2023-12-22T22:33:24.444Z","1.0.1":"2023-12-21T15:46:30.445Z","1.0.2":"2023-12-21T16:17:41.805Z","1.0.3":"2023-12-22T22:31:21.537Z","1.1.0":"2023-12-22T22:33:24.224Z"},"maintainers":[{"name":"blobkat","email":"blob.kat@hotmail.com"}],"description":"Alternate and slightly faster implementation of [map2](https://www.npmjs.com/package/map2) and [set2](https://www.npmjs.com/package/set2) allowing you to use more than one key as the key","keywords":["map","es6","map2","tuple","set","set2","keys","hashmap","hashset"],"repository":{"type":"git","url":"github.com/BlobTheKat/2keys"},"license":"MIT","readme":"Alternate and slightly faster implementation of [map2](https://www.npmjs.com/package/map2) and [set2](https://www.npmjs.com/package/set2) allowing you to use more than one key as the key\n\n✅ Performance guarantee. Found a faster implementation? Make an issue on our github!\n\n- ES6 support\n- Available in global scope\n- `Map2` & `Set2`\n- Can be used exactly like existing `Set` and `Map`\n- Support for `.swap()` and `.pop()`\n\n\n```js\nimport '2keys'\n\nconst map = new Map()\nmap.set([1, 2], 3)\nmap.get([1, 2])\n// => undefined\n// ES6 map is by reference, not value\n\nconst map = new Map2()\nmap.set(1, 2, 3)\nmap.get(1, 2)\n// => 3\nconst x = {}, y = []\nmap.set(x, y, {a: 1})\nmap.get(x, y)\n// => {a: 1}\nmap.has(x, y)\n// true\nmap.delete(x, y)\nmap.get(x, y)\n// => undefined\n\nconst map = new Map2([\n\t[1, 2, 3],\n\t[1, 5, 6],\n\t[2, 10, 12],\n])\nmap.set(3, 4, 7).set(9, 9, 9)\nmap.size\n// => 5\n\nfor(const [k1, k2, v] of map){\n\tconsole.log(k1, k2, v)\n}\n// 1 2 3\n// 1 5 6\n// 2 10 12\n// 3 4 7\n// 9 9 9\n\nconsole.log([...map.values()])\n// => [3, 6, 12, 7, 9]\nconsole.log([...map.keys()])\n// => [[1, 2], [1, 5], [2, 10], [3, 4], [9, 9]]\nconsole.log(map.submap(1))\n// => Map(2) { 2 => 3, 5 => 6 }\nconsole.log(map)\n// Map2(4) { (1, 2) => 3, (1, 5) => 6, (2, 10) => 12, (3, 4) => 7, (9, 9) => 9 }\nmap.clear()\n\n\nconst set = new Set2()\n\n// Chaining works on both set and map\nset.add(1, 2).add(3, 4)\nset.swap(5, 5)\n// => false\nset\n// Set2(3) { (1, 2), (3, 4), (5, 5) }\nset.swap(5, 5)\n// => true  (entry was present, set unchanged)\n\nfor(const [a, b] of set){\n\tconsole.log(a, b)\n}\n// 1 2\n// 3 4\n// 5 5\n```","readmeFilename":"README.md"}