{"_id":"mongodb-index-model","_rev":"286-d7197e1e05cb92c3cbec3c5357a7208f","name":"mongodb-index-model","dist-tags":{"experimental":"0.0.0-experimental-1c53312ce4905234885618d41ae95fde9c21aa18","latest":"4.1.2","next":"0.0.0-next-a863ce6adfb98ced08f9644a294f5b63b110c7d8"},"versions":{"0.1.0":{"name":"mongodb-index-model","version":"0.1.0","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"Apache-2.0","_id":"mongodb-index-model@0.1.0","maintainers":[{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/mongodb-index-model","bugs":{"url":"https://github.com/mongodb-js/mongodb-index-model/issues"},"dist":{"shasum":"ae470a7e18225b5c237954fefff002bd877fbdaf","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.1.0.tgz","integrity":"sha512-/Fx7T4BbMnwPO+uEwQlrRc8GKymXLvq9N5JnY6su8vqqjcW8L8s48jLlpnxY1RjcDDpvUcnUtHk2fAZZcNO1dg==","signatures":[{"sig":"MEUCIQColpVeTJyci15PkW53fYJVWwlw0tEoh/nEsAApOSUfwgIgFxFKDE8POHYygQrgpxpVk0ytoXL2qH5h5k1GwUiE3Vk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"_from":".","_shasum":"ae470a7e18225b5c237954fefff002bd877fbdaf","gitHead":"0359cc85a2ee6ce2e9448e4ad4dc4410c28417c5","scripts":{"ci":"mocha","test":"mocha","check":"mongodb-js-precommit"},"_npmUser":{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"},"precommit":["check","test"],"repository":{"url":"git://github.com/mongodb-js/mongodb-index-model.git","type":"git"},"_npmVersion":"2.12.1","description":"MongoDB index model.","directories":{},"_nodeVersion":"0.12.7","dependencies":{"ampersand-model":"^5.0.3","ampersand-rest-collection":"^4.0.0"},"devDependencies":{"mocha":"^2.2.5","pre-commit":"^1.1.1","mongodb-js-precommit":"^0.1.4","eslint-config-mongodb-js":"^0.1.5"}},"0.1.1":{"name":"mongodb-index-model","version":"0.1.1","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"Apache-2.0","_id":"mongodb-index-model@0.1.1","maintainers":[{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"},{"name":"mongodb-js","email":"lucas.hrabovsky+mongodb-js@10gen.com"}],"homepage":"https://github.com/mongodb-js/mongodb-index-model","bugs":{"url":"https://github.com/mongodb-js/mongodb-index-model/issues"},"dist":{"shasum":"945274c31e89135b00e90a66fe7307b1cb725d78","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.1.1.tgz","integrity":"sha512-o/1PS/X2/moLgGzbVZ6nKGgZMBM63Qd9Emobbtg0Yo3QnCSEG+HtJsSWcWS8ZnSO/TNvy6Rkd06qWRmgXGiBHA==","signatures":[{"sig":"MEUCIHoTuTIrMJhlIghMNwx2pmmlIyL59F0dMB/ino5fX444AiEA+6FMHch1oatek8g2PpDZ19RSempOhbYwInGBEFThEfY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"_from":".","_shasum":"945274c31e89135b00e90a66fe7307b1cb725d78","gitHead":"c46094900a953ea1b4e9678fe16b5883f9e6661f","scripts":{"ci":"npm run check && npm test","test":"mocha","check":"mongodb-js-precommit"},"_npmUser":{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"},"precommit":["check"],"repository":{"url":"git://github.com/mongodb-js/mongodb-index-model.git","type":"git"},"_npmVersion":"3.3.1","description":"MongoDB index model.","directories":{},"_nodeVersion":"0.12.7","dependencies":{"ampersand-model":"^6.0.2","ampersand-rest-collection":"^5.0.0"},"devDependencies":{"mocha":"^2.3.3","pre-commit":"^1.1.1","mongodb-js-precommit":"^0.2.2","eslint-config-mongodb-js":"^0.1.6"}},"0.1.2":{"name":"mongodb-index-model","version":"0.1.2","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"Apache-2.0","_id":"mongodb-index-model@0.1.2","maintainers":[{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"},{"name":"mongodb-js","email":"lucas.hrabovsky+mongodb-js@10gen.com"}],"homepage":"https://github.com/mongodb-js/mongodb-index-model","bugs":{"url":"https://github.com/mongodb-js/mongodb-index-model/issues"},"dist":{"shasum":"f69af9b294158e9870bfe1c1b18210b6643dee1f","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.1.2.tgz","integrity":"sha512-/RltArsumbY3fTRWvTXNFZg19Poxc1S5IFknk4jpiLCkYvy46qHE1SAvzi8ElOIfYFqFV3rJcSVktZiug8qNFw==","signatures":[{"sig":"MEQCIDn2n2ld1t16mYS4zcSklbsk7l0prLOwtsdygrDAh25zAiB5G/VvhfJkii5WO7v7VphKAbHUX52k6O3R3WyI69wqNw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"_from":".","_shasum":"f69af9b294158e9870bfe1c1b18210b6643dee1f","gitHead":"6fc158975546b605b925bb185aefa359acfb59a8","scripts":{"ci":"npm run check && npm test","fmt":"mongodb-js-fmt test/*.js bin/*.js index.js","test":"mocha","check":"mongodb-js-precommit"},"_npmUser":{"name":"mongodb-js","email":"lucas.hrabovsky+mongodb-js@10gen.com"},"precommit":["check"],"repository":{"url":"git://github.com/mongodb-js/mongodb-index-model.git","type":"git"},"_npmVersion":"3.3.6","description":"MongoDB index model.","directories":{},"_nodeVersion":"0.12.7","dependencies":{"ampersand-model":"^6.0.2","ampersand-rest-collection":"^5.0.0"},"devDependencies":{"mocha":"^2.3.3","pre-commit":"^1.1.1","mongodb-js-fmt":"0.0.3","mongodb-js-precommit":"^0.2.2","eslint-config-mongodb-js":"^1.0.3"}},"0.1.3":{"name":"mongodb-index-model","version":"0.1.3","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"Apache-2.0","_id":"mongodb-index-model@0.1.3","maintainers":[{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"},{"name":"kangas","email":"kangas@gmail.com"},{"name":"machyne","email":"mcotter222@gmail.com"},{"name":"mongodb-js-user","email":"lucas.hrabovsky+mongodb-js@10gen.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"}],"homepage":"https://github.com/mongodb-js/index-model","bugs":{"url":"https://github.com/mongodb-js/index-model/issues"},"dist":{"shasum":"39b8f87d9b2d275cee223cc980c77db4f5bd9f60","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.1.3.tgz","integrity":"sha512-VqGVLxyj/5q9w6T9X23L0dr4Me0VkX4B49wUAnaBH2P6yH9PKOM4NnGKB2wONvnf7IQ69C2uo6uCJqGTu+uQEA==","signatures":[{"sig":"MEQCIG7NEgKHP9drzIIbGK2IqveVwHIZ4/Nx3lNonM9NjfZnAiBeGt4ZGdP3pnolF77K1OFSLzxRu/5TdwbBgGGN3dqNhw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"_from":".","_shasum":"39b8f87d9b2d275cee223cc980c77db4f5bd9f60","gitHead":"22ccb2aa67dd536e901809a37597afa67d3f70cc","scripts":{"ci":"npm run check && npm test","fmt":"mongodb-js-fmt test/*.js bin/*.js index.js","test":"mocha","check":"mongodb-js-precommit"},"_npmUser":{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"},"precommit":["check"],"repository":{"url":"git://github.com/mongodb-js/index-model.git","type":"git"},"_npmVersion":"3.3.12","description":"MongoDB index model.","directories":{},"_nodeVersion":"5.4.1","dependencies":{"ampersand-model":"^6.0.2","ampersand-rest-collection":"^5.0.0"},"devDependencies":{"mocha":"^2.4.5","pre-commit":"^1.1.2","mongodb-js-fmt":"^0.0.3","mongodb-js-precommit":"^0.2.8","eslint-config-mongodb-js":"^1.0.6"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model-0.1.3.tgz_1457040387741_0.5885617416352034","host":"packages-12-west.internal.npmjs.com"}},"0.2.0":{"name":"mongodb-index-model","version":"0.2.0","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"Apache-2.0","_id":"mongodb-index-model@0.2.0","maintainers":[{"name":"durran","email":"durran@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"},{"name":"kangas","email":"kangas@gmail.com"},{"name":"machyne","email":"mcotter222@gmail.com"},{"name":"mongodb-js-user","email":"lucas.hrabovsky+mongodb-js@10gen.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"}],"homepage":"https://github.com/mongodb-js/index-model","bugs":{"url":"https://github.com/mongodb-js/index-model/issues"},"dist":{"shasum":"18c43a8c103a33b1e522fa178d02734f226d3fa2","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.2.0.tgz","integrity":"sha512-ptBA8j+PqPIUn/MZ2qon9aiFfk8rCV8FqTvaSdrrZ4MLbTQj+SiydOd2w8U0JZh0gQBNcdvhApK2GHwF7WlZ+g==","signatures":[{"sig":"MEQCIAeuny5jPTDy9ttt1xbN+jvfsx8AAWsJTG/bEqgAzN3zAiAifJbBn08bc1Y7O+rLA16pY2snkKDVJzAoMC9lew+Z7w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"_from":".","_shasum":"18c43a8c103a33b1e522fa178d02734f226d3fa2","gitHead":"94e3a8069e6e71db82a695963b225413f37fb19f","scripts":{"ci":"npm run check && npm test","fmt":"mongodb-js-fmt test/*.js bin/*.js index.js","test":"mocha","check":"mongodb-js-precommit"},"_npmUser":{"name":"rueckstiess","email":"thomas@rueckstiess.net"},"precommit":["check"],"repository":{"url":"git://github.com/mongodb-js/index-model.git","type":"git"},"_npmVersion":"3.6.0","description":"MongoDB index model.","directories":{},"_nodeVersion":"5.7.0","dependencies":{"lodash":"^4.6.1","ampersand-model":"^6.0.2","ampersand-rest-collection":"^5.0.0"},"devDependencies":{"debug":"^2.2.0","mocha":"^2.4.5","pre-commit":"^1.1.2","mongodb-js-fmt":"^0.0.3","mongodb-js-precommit":"^0.2.8","eslint-config-mongodb-js":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model-0.2.0.tgz_1458790189418_0.4859327208250761","host":"packages-13-west.internal.npmjs.com"}},"0.3.0":{"name":"mongodb-index-model","version":"0.3.0","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"Apache-2.0","_id":"mongodb-index-model@0.3.0","maintainers":[{"name":"durran","email":"durran@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"},{"name":"kangas","email":"kangas@gmail.com"},{"name":"machyne","email":"mcotter222@gmail.com"},{"name":"mongodb-js-user","email":"lucas.hrabovsky+mongodb-js@10gen.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"}],"homepage":"https://github.com/mongodb-js/index-model","bugs":{"url":"https://github.com/mongodb-js/index-model/issues"},"dist":{"shasum":"15b90a578b1315dca5f84618f189bf4ac8d3c327","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.3.0.tgz","integrity":"sha512-IGRxwmpCnFTRFkLhYhxaHn5N68iJpR+wiTIhcNAbuzu7DIydpeL7YvpasCnOo4GilEn+w7ChuukWQd5hxq5lew==","signatures":[{"sig":"MEUCIEwRu9M+/lMaP/BZdR8QLhaZJgsHKX9sMVdtV9HG5OL8AiEA4e3OEfdpjmdWGmLquPczsQyHV81zYCCPLewh/WNEC/4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"_from":".","_shasum":"15b90a578b1315dca5f84618f189bf4ac8d3c327","gitHead":"f253515411b6cfa3c49dcdabdd5d087c343faf30","scripts":{"ci":"npm run check && npm test","fmt":"mongodb-js-fmt test/*.js bin/*.js index.js","test":"mocha","check":"mongodb-js-precommit"},"_npmUser":{"name":"rueckstiess","email":"thomas@rueckstiess.net"},"precommit":["check"],"repository":{"url":"git://github.com/mongodb-js/index-model.git","type":"git"},"_npmVersion":"3.6.0","description":"MongoDB index model.","directories":{},"_nodeVersion":"5.7.0","dependencies":{"lodash":"^4.6.1","ampersand-model":"^6.0.2","ampersand-rest-collection":"^5.0.0"},"devDependencies":{"debug":"^2.2.0","mocha":"^2.4.5","pre-commit":"^1.1.2","mongodb-js-fmt":"^0.0.3","mongodb-js-precommit":"^0.2.8","eslint-config-mongodb-js":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model-0.3.0.tgz_1459227618813_0.4878760848660022","host":"packages-12-west.internal.npmjs.com"}},"0.4.0":{"name":"mongodb-index-model","version":"0.4.0","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"Apache-2.0","_id":"mongodb-index-model@0.4.0","maintainers":[{"name":"durran","email":"durran@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"},{"name":"kangas","email":"kangas@gmail.com"},{"name":"machyne","email":"mcotter222@gmail.com"},{"name":"mongodb-js-user","email":"lucas.hrabovsky+mongodb-js@10gen.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"}],"homepage":"https://github.com/mongodb-js/index-model","bugs":{"url":"https://github.com/mongodb-js/index-model/issues"},"dist":{"shasum":"d9d95f2e0146b343707a87c16abe398ac0d391ad","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.4.0.tgz","integrity":"sha512-8+HlqK/X0C/AGksvTuxFhuQexKVQZHfeGncjyXKPbicgEuTnAQjP7/Ra45Zei3TPL8PN0dylsXZ6r5Tw/4JP6w==","signatures":[{"sig":"MEQCICzcSOEG/HA/p9Cq4LCKrEXNIz42HMdo3U14Q1uwQsyMAiBOsW7vMj5j1OGiYN02N8aQyD8TR5sW6JH3aTQjk2N38A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"_from":".","_shasum":"d9d95f2e0146b343707a87c16abe398ac0d391ad","gitHead":"7c483f3974e4f29a6aa4593c9ded133592b5d98b","scripts":{"ci":"npm run check && npm test","fmt":"mongodb-js-fmt test/*.js bin/*.js index.js","test":"mocha","check":"mongodb-js-precommit"},"_npmUser":{"name":"rueckstiess","email":"thomas@rueckstiess.net"},"precommit":["check"],"repository":{"url":"git+https://github.com/mongodb-js/index-model.git","type":"git"},"_npmVersion":"3.6.0","description":"MongoDB index model.","directories":{},"_nodeVersion":"5.7.0","dependencies":{"async":"^1.5.2","lodash":"^4.6.1","mongodb-ns":"^1.0.3","ampersand-model":"^6.0.2","ampersand-rest-collection":"^5.0.0"},"devDependencies":{"debug":"^2.2.0","mocha":"^2.4.5","pre-commit":"^1.1.2","mongodb-js-fmt":"^0.0.3","mongodb-runner":"^3.2.0","mongodb-js-precommit":"^0.2.8","eslint-config-mongodb-js":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model-0.4.0.tgz_1459486457593_0.19655002024956048","host":"packages-12-west.internal.npmjs.com"}},"0.4.1":{"name":"mongodb-index-model","version":"0.4.1","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"Apache-2.0","_id":"mongodb-index-model@0.4.1","maintainers":[{"name":"durran","email":"durran@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"},{"name":"kangas","email":"kangas@gmail.com"},{"name":"machyne","email":"mcotter222@gmail.com"},{"name":"mongodb-js-user","email":"lucas.hrabovsky+mongodb-js@10gen.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"}],"homepage":"https://github.com/mongodb-js/index-model","bugs":{"url":"https://github.com/mongodb-js/index-model/issues"},"dist":{"shasum":"c47a6093fc92051568f949300e9a9c5a9849abe9","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.4.1.tgz","integrity":"sha512-fA8Cs1fwvwPRxl+qw6tEX/vBXQUyCtKZCZGjG8WB6e8Z3CTsLB8c0DXf8bnTCFZ+ric9ujxvJgpp8028bDAntQ==","signatures":[{"sig":"MEYCIQDjoEIdb/qPHIhFDxIxgd7grVP6g6e+MYxhhX3ecZph3gIhAOOg8Daa8FpgYzuIyEGZtrbyhR9E/i/NrKRkeZ3h+jMB","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"_from":".","_shasum":"c47a6093fc92051568f949300e9a9c5a9849abe9","gitHead":"e77811cdfda52bd4243a744423a7d955f80ff492","scripts":{"ci":"npm run check && npm test","fmt":"mongodb-js-fmt test/*.js bin/*.js index.js","test":"mocha","check":"mongodb-js-precommit"},"_npmUser":{"name":"rueckstiess","email":"thomas@rueckstiess.net"},"precommit":["check"],"repository":{"url":"git+https://github.com/mongodb-js/index-model.git","type":"git"},"_npmVersion":"3.6.0","description":"MongoDB index model.","directories":{},"_nodeVersion":"5.7.0","dependencies":{"async":"^1.5.2","lodash":"^4.6.1","mongodb-ns":"^1.0.3","ampersand-model":"^6.0.2","ampersand-rest-collection":"^5.0.0"},"devDependencies":{"debug":"^2.2.0","mocha":"^2.4.5","pre-commit":"^1.1.2","mongodb-js-fmt":"^0.0.3","mongodb-runner":"^3.2.0","mongodb-js-precommit":"^0.2.8","eslint-config-mongodb-js":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model-0.4.1.tgz_1459833399072_0.17799714882858098","host":"packages-12-west.internal.npmjs.com"}},"0.4.2":{"name":"mongodb-index-model","version":"0.4.2","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"Apache-2.0","_id":"mongodb-index-model@0.4.2","maintainers":[{"name":"durran","email":"durran@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"},{"name":"kangas","email":"kangas@gmail.com"},{"name":"machyne","email":"mcotter222@gmail.com"},{"name":"mongodb-js-user","email":"lucas.hrabovsky+mongodb-js@10gen.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"}],"homepage":"https://github.com/mongodb-js/index-model","bugs":{"url":"https://github.com/mongodb-js/index-model/issues"},"dist":{"shasum":"7f9fc2d993475ca528fe4dd7f125505d6ee7dd20","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.4.2.tgz","integrity":"sha512-IXfGPDhHUiYYlzMNK4WcreMatTjhNGb/tzmcEZNV8D2fQMeq9OqI5dEsKvHvc5q5fYktYeAHxUFLJrRfCmGVmQ==","signatures":[{"sig":"MEQCIC+uVRv9RvGJQYN7NKmpaHqYR6Ngb3HH+hUspevd2oP1AiAIiDHgQyNdJNSvfZOuE5v/vKjR+yVEiZFndwMvNx9B3Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"_from":".","_shasum":"7f9fc2d993475ca528fe4dd7f125505d6ee7dd20","gitHead":"9c5a0a1bf1c4a9aac7cc0b0341d8bed111492a68","scripts":{"ci":"npm run check && npm test","fmt":"mongodb-js-fmt test/*.js bin/*.js index.js","test":"mocha","check":"mongodb-js-precommit"},"_npmUser":{"name":"rueckstiess","email":"thomas@rueckstiess.net"},"precommit":["check"],"repository":{"url":"git+https://github.com/mongodb-js/index-model.git","type":"git"},"_npmVersion":"3.6.0","description":"MongoDB index model.","directories":{},"_nodeVersion":"5.7.0","dependencies":{"async":"^1.5.2","lodash":"^4.6.1","mongodb-ns":"^1.0.3","ampersand-model":"^6.0.2","ampersand-rest-collection":"^5.0.0"},"devDependencies":{"debug":"^2.2.0","mocha":"^2.4.5","pre-commit":"^1.1.2","mongodb-js-fmt":"^0.0.3","mongodb-runner":"^3.2.0","mongodb-js-precommit":"^0.2.8","eslint-config-mongodb-js":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model-0.4.2.tgz_1459836600478_0.02762147318571806","host":"packages-12-west.internal.npmjs.com"}},"0.5.0":{"name":"mongodb-index-model","version":"0.5.0","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"Apache-2.0","_id":"mongodb-index-model@0.5.0","maintainers":[{"name":"durran","email":"durran@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"},{"name":"kangas","email":"kangas@gmail.com"},{"name":"machyne","email":"mcotter222@gmail.com"},{"name":"mongodb-js-user","email":"lucas.hrabovsky+mongodb-js@10gen.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"}],"homepage":"https://github.com/mongodb-js/index-model","bugs":{"url":"https://github.com/mongodb-js/index-model/issues"},"dist":{"shasum":"23193ddaf70576d2bbd6a3729761199adcf25e87","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.5.0.tgz","integrity":"sha512-ursOg0s9ilH3SN8ovlam2GdNtELB3YBVbt6IP5r563Dq9NujyeYp/3wTnh2itu7ANYf1hE2KmvLc0ukD4Ptd7A==","signatures":[{"sig":"MEYCIQC3afxPM9BSyskuPhlaT8P0EYZ0wvtlewDs2+zhXfY1fgIhAL5PYWvKZv57yMYTi2hxvsokOi53T3ebJCIV65uqTM6e","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"_from":".","_shasum":"23193ddaf70576d2bbd6a3729761199adcf25e87","gitHead":"c2573ef0ccf9e9eb767550a866b7eb6e196eaac0","scripts":{"ci":"npm run check && npm test","fmt":"mongodb-js-fmt test/*.js bin/*.js index.js","test":"mocha","check":"mongodb-js-precommit"},"_npmUser":{"name":"rueckstiess","email":"thomas@rueckstiess.net"},"precommit":["check"],"repository":{"url":"git+https://github.com/mongodb-js/index-model.git","type":"git"},"_npmVersion":"3.6.0","description":"MongoDB index model.","directories":{},"_nodeVersion":"5.7.0","dependencies":{"async":"^1.5.2","lodash":"^4.8.2","triejs":"^0.1.5","mongodb-ns":"^1.0.3","ampersand-model":"^6.0.2","ampersand-collection":"^1.6.1","ampersand-rest-collection":"^5.0.0"},"devDependencies":{"debug":"^2.2.0","mocha":"^2.4.5","pre-commit":"^1.1.2","mongodb-js-fmt":"^0.0.3","mongodb-runner":"^3.2.0","mongodb-js-precommit":"^0.2.8","eslint-config-mongodb-js":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model-0.5.0.tgz_1460516416283_0.49228421482257545","host":"packages-12-west.internal.npmjs.com"}},"0.5.1":{"name":"mongodb-index-model","version":"0.5.1","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"Apache-2.0","_id":"mongodb-index-model@0.5.1","maintainers":[{"name":"durran","email":"durran@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"},{"name":"kangas","email":"kangas@gmail.com"},{"name":"machyne","email":"mcotter222@gmail.com"},{"name":"mongodb-js-user","email":"lucas.hrabovsky+mongodb-js@10gen.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"}],"homepage":"https://github.com/mongodb-js/index-model","bugs":{"url":"https://github.com/mongodb-js/index-model/issues"},"dist":{"shasum":"60c6f05101c520b104d77059f5c4ca455fdf4d2b","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.5.1.tgz","integrity":"sha512-kkcaLJlZTMIeyTtSaZ8f0VhrrnFg1J89B/1UApFL1bRIVv01sPCpVyohPS/0HN8GkrGfGyKf7rT/pbgnXKw8og==","signatures":[{"sig":"MEUCIQCTuda/jP5C3C7Lq7kUmrDKEjZyUw5W/CS81ikoZb42IQIge6Fyu5B08HK5/+qzat5x6jOEWsGji7Zd3l7TBNhp0SY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"_from":".","_shasum":"60c6f05101c520b104d77059f5c4ca455fdf4d2b","gitHead":"040bc85856cf426b891a6eabe1d29d3f382a0044","scripts":{"ci":"npm run check && npm test","fmt":"mongodb-js-fmt test/*.js bin/*.js index.js","test":"mocha","check":"mongodb-js-precommit"},"_npmUser":{"name":"rueckstiess","email":"thomas@rueckstiess.net"},"precommit":["check"],"repository":{"url":"git+https://github.com/mongodb-js/index-model.git","type":"git"},"_npmVersion":"3.6.0","description":"MongoDB index model.","directories":{},"_nodeVersion":"5.7.0","dependencies":{"async":"^1.5.2","lodash":"^4.8.2","triejs":"github:rueckstiess/triejs","mongodb-ns":"^1.0.3","ampersand-model":"^6.0.2","ampersand-collection":"^1.6.1","ampersand-rest-collection":"^5.0.0"},"devDependencies":{"debug":"^2.2.0","mocha":"^2.4.5","pre-commit":"^1.1.2","mongodb-js-fmt":"^0.0.3","mongodb-runner":"^3.2.0","mongodb-js-precommit":"^0.2.8","eslint-config-mongodb-js":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model-0.5.1.tgz_1460526565632_0.8633356096688658","host":"packages-12-west.internal.npmjs.com"}},"0.5.2":{"name":"mongodb-index-model","version":"0.5.2","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"Apache-2.0","_id":"mongodb-index-model@0.5.2","maintainers":[{"name":"durran","email":"durran@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"},{"name":"kangas","email":"kangas@gmail.com"},{"name":"machyne","email":"mcotter222@gmail.com"},{"name":"mongodb-js-user","email":"lucas.hrabovsky+mongodb-js@10gen.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"}],"homepage":"https://github.com/mongodb-js/index-model","bugs":{"url":"https://github.com/mongodb-js/index-model/issues"},"dist":{"shasum":"3ee63fc486981dce46b6be9c7e7c425ff53daedf","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.5.2.tgz","integrity":"sha512-t0AyrrTZ6fkqVi8GFwUtboDpe6VfBMAOzVKBbdR1ZuSrU2GAkz+R9iN2yx2O73ISErGcL+7JeY5bjR73JSVQ7A==","signatures":[{"sig":"MEUCIDoLe+oQykHVO/LtjoG3Jc8aPdS/APj4i7bGT2Bn8Zj0AiEA5xrGGJtzLl58LAQCpoC9EIJykOPhGqcD0LKZcaUtTa8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"_from":".","_shasum":"3ee63fc486981dce46b6be9c7e7c425ff53daedf","gitHead":"6fe7d8c368d328c61c3ca8904ec5282a8de965c1","scripts":{"ci":"npm run check && npm test","fmt":"mongodb-js-fmt test/*.js bin/*.js index.js","test":"mocha","check":"mongodb-js-precommit"},"_npmUser":{"name":"rueckstiess","email":"thomas@rueckstiess.net"},"precommit":["check"],"repository":{"url":"git+https://github.com/mongodb-js/index-model.git","type":"git"},"_npmVersion":"3.6.0","description":"MongoDB index model.","directories":{},"_nodeVersion":"5.7.0","dependencies":{"async":"^1.5.2","lodash":"^4.8.2","triejs":"github:rueckstiess/triejs","mongodb-ns":"^1.0.3","ampersand-model":"^6.0.2","ampersand-collection":"^1.6.1","ampersand-rest-collection":"^5.0.0"},"devDependencies":{"debug":"^2.2.0","mocha":"^2.4.5","pre-commit":"^1.1.2","mongodb-js-fmt":"^0.0.3","mongodb-runner":"^3.2.0","mongodb-js-precommit":"^0.2.8","eslint-config-mongodb-js":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model-0.5.2.tgz_1460700393281_0.724204056430608","host":"packages-16-east.internal.npmjs.com"}},"0.5.3":{"name":"mongodb-index-model","version":"0.5.3","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"Apache-2.0","_id":"mongodb-index-model@0.5.3","maintainers":[{"name":"cilix","email":"matthewlevenstein@gmail.com"},{"name":"dpercy","email":"davetp425@gmail.com"},{"name":"durran","email":"durran@gmail.com"},{"name":"glowe","email":"graham.lowe@gmail.com"},{"name":"i80and","email":"i80and@foxquill.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"},{"name":"kangas","email":"kangas@gmail.com"},{"name":"kay-kim","email":"kay@mongodb.com"},{"name":"machyne","email":"mcotter222@gmail.com"},{"name":"micheal.parks","email":"michealparks1989@gmail.com"},{"name":"mongodb-js-user","email":"lucas.hrabovsky+mongodb-js@10gen.com"},{"name":"redondos","email":"aolivera@gmail.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"schwartzrw","email":"schwartzrw@gmail.com"}],"homepage":"https://github.com/mongodb-js/index-model","bugs":{"url":"https://github.com/mongodb-js/index-model/issues"},"dist":{"shasum":"23852e858362005a2958d87ff0d50237400fa842","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.5.3.tgz","integrity":"sha512-NUuxdOxYeVXgATQYnmtg3UlSG+c0WiHZNCd6NFa+dE/nEOugVuuX7Qu1aqlRnwEZ9HzpsOxm+8qVRfxfhq/Ofw==","signatures":[{"sig":"MEQCIHULt9tCdXzEZ9Lr4sbeN3cTeyIbrX/dYvaK1L2dO6ChAiAQ9bJI4/1H8MA6g58h6Bs9la8/twPA1dR58c6kujDAoQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"_from":".","_shasum":"23852e858362005a2958d87ff0d50237400fa842","gitHead":"309ccae789f59181b50d85d7f6283268f1e5dd0b","scripts":{"ci":"npm run check && npm test","fmt":"mongodb-js-fmt test/*.js bin/*.js index.js","test":"mocha","check":"mongodb-js-precommit"},"_npmUser":{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"},"precommit":["check"],"repository":{"url":"git+https://github.com/mongodb-js/index-model.git","type":"git"},"_npmVersion":"3.8.8","description":"MongoDB index model.","directories":{},"_nodeVersion":"5.10.1","dependencies":{"async":"^1.5.2","lodash":"^4.8.2","triejs":"github:rueckstiess/triejs","mongodb-ns":"^1.0.3","ampersand-model":"^6.0.2","mongodb-js-errors":"^0.2.1","ampersand-collection":"^2.0.0","ampersand-rest-collection":"^6.0.0"},"devDependencies":{"debug":"^2.2.0","mocha":"^2.5.3","pre-commit":"^1.1.2","mongodb-js-fmt":"^0.0.3","mongodb-runner":"^3.3.2","mongodb-js-precommit":"^0.2.8","eslint-config-mongodb-js":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model-0.5.3.tgz_1466437027336_0.12633176357485354","host":"packages-12-west.internal.npmjs.com"}},"0.5.4":{"name":"mongodb-index-model","version":"0.5.4","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"Apache-2.0","_id":"mongodb-index-model@0.5.4","maintainers":[{"name":"cilix","email":"matthewlevenstein@gmail.com"},{"name":"dpercy","email":"davetp425@gmail.com"},{"name":"durran","email":"durran@gmail.com"},{"name":"glowe","email":"graham.lowe@gmail.com"},{"name":"i80and","email":"i80and@foxquill.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"},{"name":"kangas","email":"kangas@gmail.com"},{"name":"kay-kim","email":"kay@mongodb.com"},{"name":"machyne","email":"mcotter222@gmail.com"},{"name":"micheal.parks","email":"michealparks1989@gmail.com"},{"name":"mongodb-js-user","email":"lucas.hrabovsky+mongodb-js@10gen.com"},{"name":"redondos","email":"aolivera@gmail.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"schwartzrw","email":"schwartzrw@gmail.com"}],"homepage":"https://github.com/mongodb-js/index-model","bugs":{"url":"https://github.com/mongodb-js/index-model/issues"},"dist":{"shasum":"821c0fbd6fbe896d0f789bbded1076b2ed215d06","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.5.4.tgz","integrity":"sha512-bG3kSsCa5Q9NaxsvasrUMFiv7KPt16iVJP3DxAEVlQt0Ycyi2mqxhgAMMpRy6Pe11cAjd8qQNa5BiRxrq2ksbw==","signatures":[{"sig":"MEYCIQDlNwXbHiscnTuisDUwllufv6qXx78M83R8qTcOIABUXwIhANJ61h3qQQnXEQ+pYjeZ8msRcOQf9MNu7fHu26HauA1V","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"_from":".","_shasum":"821c0fbd6fbe896d0f789bbded1076b2ed215d06","gitHead":"2385e0c5b163754ff4e7aac32ba5ce7fa76d23a9","scripts":{"ci":"npm run check && npm test","fmt":"mongodb-js-fmt test/*.js bin/*.js index.js","test":"mocha","check":"mongodb-js-precommit"},"_npmUser":{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"},"precommit":["check"],"repository":{"url":"git+https://github.com/mongodb-js/index-model.git","type":"git"},"_npmVersion":"3.8.8","description":"MongoDB index model.","directories":{},"_nodeVersion":"5.10.1","dependencies":{"async":"^1.5.2","lodash":"^4.8.2","triejs":"github:rueckstiess/triejs","mongodb-ns":"^1.0.3","ampersand-model":"^6.0.2","mongodb-js-errors":"^0.2.1","ampersand-collection":"^1.6.1","ampersand-rest-collection":"^5.0.0"},"devDependencies":{"debug":"^2.2.0","mocha":"^2.5.3","pre-commit":"^1.1.2","mongodb-js-fmt":"^0.0.3","mongodb-runner":"^3.3.2","mongodb-js-precommit":"^0.2.8","eslint-config-mongodb-js":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model-0.5.4.tgz_1466539578579_0.34367500501684844","host":"packages-16-east.internal.npmjs.com"}},"0.5.5":{"name":"mongodb-index-model","version":"0.5.5","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"Apache-2.0","_id":"mongodb-index-model@0.5.5","maintainers":[{"name":"brahmgardner","email":"brahm.gardner@gmail.com"},{"name":"cilix","email":"matthewlevenstein@gmail.com"},{"name":"dpercy","email":"davetp425@gmail.com"},{"name":"durran","email":"durran@gmail.com"},{"name":"glowe","email":"graham.lowe@gmail.com"},{"name":"i80and","email":"i80and@foxquill.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"},{"name":"kangas","email":"kangas@gmail.com"},{"name":"kay-kim","email":"kay@mongodb.com"},{"name":"machyne","email":"mcotter222@gmail.com"},{"name":"micheal.parks","email":"michealparks1989@gmail.com"},{"name":"mongodb-js-user","email":"lucas.hrabovsky+mongodb-js@10gen.com"},{"name":"redondos","email":"aolivera@gmail.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"schwartzrw","email":"schwartzrw@gmail.com"},{"name":"shum","email":"chris.shum@mongodb.com"}],"homepage":"https://github.com/mongodb-js/index-model","bugs":{"url":"https://github.com/mongodb-js/index-model/issues"},"dist":{"shasum":"7aa64f5d7563563d5368bbb8aa34a13a93bc227b","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.5.5.tgz","integrity":"sha512-ptVN7Z7fwzoNFCiiba9UWp/U4N4Su3EqirgALfCSC/2v8OrTmk3qo2W5s9NA9VwgsrC3A5Yq/CgyYzqKQQfDvg==","signatures":[{"sig":"MEUCIQCVgRb27ACkho+faAjPr0fjFRxwbEBv/b24LjcTT0DmawIgKyeKo4PTmHQkm2gRSOi6VDWQOnYfr+QyMfuCSryUbkw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"_from":".","_shasum":"7aa64f5d7563563d5368bbb8aa34a13a93bc227b","gitHead":"0e286f4a8dd5c9e02ec67c70b0ce0fb58ab81cb4","scripts":{"ci":"npm run check && npm test","fmt":"mongodb-js-fmt test/*.js bin/*.js index.js","test":"mocha","check":"mongodb-js-precommit"},"_npmUser":{"name":"kangas","email":"kangas@gmail.com"},"precommit":["check"],"repository":{"url":"git+https://github.com/mongodb-js/index-model.git","type":"git"},"_npmVersion":"3.10.3","description":"MongoDB index model.","directories":{},"_nodeVersion":"6.3.1","dependencies":{"async":"^1.5.2","lodash":"^4.8.2","triejs":"github:rueckstiess/triejs","mongodb-ns":"^1.0.3","ampersand-model":"^6.0.2","mongodb-js-errors":"^0.2.1","ampersand-collection":"^1.6.1","ampersand-rest-collection":"^5.0.0"},"devDependencies":{"debug":"^2.2.0","mocha":"^2.5.3","pre-commit":"^1.1.2","mongodb-js-fmt":"^0.0.3","mongodb-runner":"^3.3.2","mongodb-js-precommit":"^0.2.9","eslint-config-mongodb-js":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model-0.5.5.tgz_1472235593373_0.614441242069006","host":"packages-12-west.internal.npmjs.com"}},"0.6.0":{"name":"mongodb-index-model","version":"0.6.0","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"Apache-2.0","_id":"mongodb-index-model@0.6.0","maintainers":[{"name":"brahmgardner","email":"brahm.gardner@gmail.com"},{"name":"cilix","email":"matthewlevenstein@gmail.com"},{"name":"dpercy","email":"davetp425@gmail.com"},{"name":"durran","email":"durran@gmail.com"},{"name":"glowe","email":"graham.lowe@gmail.com"},{"name":"i80and","email":"i80and@foxquill.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"},{"name":"kangas","email":"kangas@gmail.com"},{"name":"kay-kim","email":"kay@mongodb.com"},{"name":"machyne","email":"mcotter222@gmail.com"},{"name":"micheal.parks","email":"michealparks1989@gmail.com"},{"name":"mongodb-js-user","email":"lucas.hrabovsky+mongodb-js@10gen.com"},{"name":"redondos","email":"aolivera@gmail.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"schwartzrw","email":"schwartzrw@gmail.com"},{"name":"shum","email":"chris.shum@mongodb.com"}],"homepage":"https://github.com/mongodb-js/index-model","bugs":{"url":"https://github.com/mongodb-js/index-model/issues"},"dist":{"shasum":"8509e8be0d623a209f6fecfc6bcb8c606e8ff88f","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.6.0.tgz","integrity":"sha512-EgBQKyNcYWcvaKuWf222c5fZg9P82fGjyQn4amEVndRhSinQqZGtVl6SUDz6fD0Wg+oke4opbpy5BeZs+yG4KQ==","signatures":[{"sig":"MEUCIQDK32+Q+fvVI3yILltXHIZFuE2FMkegc3mTmQEk2JfvygIgYZn7uJgcXc0TdTdKg4FkHyypodAvyluX4jYCv1/CQ1Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"_from":".","_shasum":"8509e8be0d623a209f6fecfc6bcb8c606e8ff88f","gitHead":"f14f0e0166e7d867f9e12dcc12e67d59d30332b5","scripts":{"ci":"npm run check && npm test","fmt":"mongodb-js-fmt test/*.js bin/*.js index.js","test":"mocha","check":"mongodb-js-precommit"},"_npmUser":{"name":"durran","email":"durran@gmail.com"},"precommit":["check"],"repository":{"url":"git+https://github.com/mongodb-js/index-model.git","type":"git"},"_npmVersion":"3.10.3","description":"MongoDB index model.","directories":{},"_nodeVersion":"6.7.0","dependencies":{"async":"^1.5.2","lodash":"^4.8.2","triejs":"github:rueckstiess/triejs","mongodb-ns":"^1.0.3","ampersand-model":"^6.0.2","mongodb-js-errors":"^0.2.1","ampersand-collection":"^1.6.1","ampersand-rest-collection":"^5.0.0"},"devDependencies":{"debug":"^2.2.0","mocha":"^3.0.2","pre-commit":"^1.1.2","mongodb-js-fmt":"^0.0.3","mongodb-runner":"^3.3.2","mongodb-js-precommit":"^0.2.9","eslint-config-mongodb-js":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model-0.6.0.tgz_1477955565277_0.31989143043756485","host":"packages-18-east.internal.npmjs.com"}},"0.6.1":{"name":"mongodb-index-model","version":"0.6.1","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"Apache-2.0","_id":"mongodb-index-model@0.6.1","maintainers":[{"name":"aherlihy","email":"anna@mongodb.com"},{"name":"brahmgardner","email":"brahm.gardner@gmail.com"},{"name":"cilix","email":"matthewlevenstein@gmail.com"},{"name":"dpercy","email":"davetp425@gmail.com"},{"name":"durran","email":"durran@gmail.com"},{"name":"glowe","email":"graham.lowe@gmail.com"},{"name":"i80and","email":"i80and@foxquill.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"},{"name":"jsmulrow","email":"jack.mulrow@gmail.com"},{"name":"justinjmoses","email":"justinjmoses@gmail.com"},{"name":"kay-kim","email":"kay@mongodb.com"},{"name":"keyboardtsundoku","email":"satyendra.n.sinha@gmail.com"},{"name":"machyne","email":"mcotter222@gmail.com"},{"name":"micheal.parks","email":"michealparks1989@gmail.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"pzrq","email":"peter@peterjs.com"},{"name":"redondos","email":"aolivera@gmail.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"schwartzrw","email":"schwartzrw@gmail.com"},{"name":"shum","email":"chris.shum@mongodb.com"}],"homepage":"https://github.com/mongodb-js/index-model","bugs":{"url":"https://github.com/mongodb-js/index-model/issues"},"dist":{"shasum":"12d95e310ba48a991409ef6c2bcbb30671111268","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.6.1.tgz","integrity":"sha512-cFVjRx3sXa3YPdCkAZub+gLW7zpx5a+nU1+USfUWv7TXCunkLi4yX5VfKbqydvnjmHYCqZq+2fBvUrG5fYF5og==","signatures":[{"sig":"MEUCIBQ0jocAjMQM3L/ldW60uyuEYpypUqHt4nuUYjOtmBt1AiEA5fMjbL5HHQiCU6eVrWACm6yP06zuq5WhyYNimnoDtHI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"_from":".","_shasum":"12d95e310ba48a991409ef6c2bcbb30671111268","gitHead":"0fdcc1cbdab73769be564a783497707c981c0ab0","scripts":{"ci":"npm run check && npm test","fmt":"mongodb-js-fmt test/*.js bin/*.js index.js","test":"mocha","check":"mongodb-js-precommit"},"_npmUser":{"name":"pzrq","email":"peter@peterjs.com"},"precommit":["check"],"repository":{"url":"git+https://github.com/mongodb-js/index-model.git","type":"git"},"_npmVersion":"3.10.9","description":"MongoDB index model.","directories":{},"_nodeVersion":"6.9.1","dependencies":{"async":"^1.5.2","lodash":"^4.8.2","triejs":"github:rueckstiess/triejs","mongodb":"^2.2.11","mongodb-ns":"^1.0.3","ampersand-model":"^6.0.2","mongodb-js-errors":"^0.2.1","ampersand-collection":"^1.6.1","ampersand-rest-collection":"^5.0.0"},"devDependencies":{"debug":"^2.2.0","mocha":"^3.1.2","pre-commit":"^1.1.2","mongodb-js-fmt":"^0.0.3","mongodb-runner":"^3.3.2","mongodb-js-precommit":"^0.2.9","eslint-config-mongodb-js":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model-0.6.1.tgz_1479868314218_0.3528580463025719","host":"packages-18-east.internal.npmjs.com"}},"0.6.2":{"name":"mongodb-index-model","version":"0.6.2","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"Apache-2.0","_id":"mongodb-index-model@0.6.2","maintainers":[{"name":"aherlihy","email":"anna@mongodb.com"},{"name":"brahmgardner","email":"brahm.gardner@gmail.com"},{"name":"cilix","email":"matthewlevenstein@gmail.com"},{"name":"dpercy","email":"davetp425@gmail.com"},{"name":"durran","email":"durran@gmail.com"},{"name":"glowe","email":"graham.lowe@gmail.com"},{"name":"i80and","email":"i80and@foxquill.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"},{"name":"jsmulrow","email":"jack.mulrow@gmail.com"},{"name":"justinjmoses","email":"justinjmoses@gmail.com"},{"name":"kay-kim","email":"kay@mongodb.com"},{"name":"keyboardtsundoku","email":"satyendra.n.sinha@gmail.com"},{"name":"machyne","email":"mcotter222@gmail.com"},{"name":"micheal.parks","email":"michealparks1989@gmail.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"pzrq","email":"peter@peterjs.com"},{"name":"redondos","email":"aolivera@gmail.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"schwartzrw","email":"schwartzrw@gmail.com"},{"name":"shum","email":"chris.shum@mongodb.com"}],"homepage":"https://github.com/mongodb-js/index-model","bugs":{"url":"https://github.com/mongodb-js/index-model/issues"},"dist":{"shasum":"7230231683e747567c64f9071671ad9abdb87fc0","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.6.2.tgz","integrity":"sha512-o8PF+nNpuKtnTjRWPIctE4AfG6/Xw0YQpQMB3fLohdcMxPnGEwMU7IykhCt/FHHs9MFkRq9WzkLMHahtpzX+JQ==","signatures":[{"sig":"MEYCIQDPWw6VqvrxubszE8A6gVRQVUgopVcoYFRVFdo4gFbiywIhAOUXlPRY8vB1bxU6Y3L73Y1RbTx9Gq8UVrUSeF+N9kez","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"_from":".","_shasum":"7230231683e747567c64f9071671ad9abdb87fc0","gitHead":"de9666a4a18b6c5158410a145d1a8c1a5509e4de","scripts":{"ci":"npm run check && npm test","fmt":"mongodb-js-fmt test/*.js bin/*.js index.js","test":"mocha","check":"mongodb-js-precommit"},"_npmUser":{"name":"pzrq","email":"peter@peterjs.com"},"precommit":["check"],"repository":{"url":"git+https://github.com/mongodb-js/index-model.git","type":"git"},"_npmVersion":"3.10.9","description":"MongoDB index model.","directories":{},"_nodeVersion":"6.9.1","dependencies":{"async":"^1.5.2","lodash":"^4.8.2","triejs":"github:rueckstiess/triejs","mongodb":"^2.2.11","mongodb-ns":"^1.0.3","ampersand-model":"^6.0.2","mongodb-js-errors":"^0.2.1","ampersand-collection":"^1.6.1","ampersand-rest-collection":"^5.0.0"},"devDependencies":{"debug":"^2.2.0","mocha":"^3.1.2","pre-commit":"^1.1.2","mongodb-js-fmt":"^0.0.3","mongodb-runner":"^3.3.2","mongodb-js-precommit":"^0.2.9","eslint-config-mongodb-js":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model-0.6.2.tgz_1479868409095_0.6876561378594488","host":"packages-12-west.internal.npmjs.com"}},"0.6.3":{"name":"mongodb-index-model","version":"0.6.3","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"Apache-2.0","_id":"mongodb-index-model@0.6.3","maintainers":[{"name":"aherlihy","email":"anna@mongodb.com"},{"name":"brahmgardner","email":"brahm.gardner@gmail.com"},{"name":"cilix","email":"matthewlevenstein@gmail.com"},{"name":"dpercy","email":"davetp425@gmail.com"},{"name":"durran","email":"durran@gmail.com"},{"name":"glowe","email":"graham.lowe@gmail.com"},{"name":"i80and","email":"i80and@foxquill.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"},{"name":"jsmulrow","email":"jack.mulrow@gmail.com"},{"name":"justinjmoses","email":"justinjmoses@gmail.com"},{"name":"kay-kim","email":"kay@mongodb.com"},{"name":"keyboardtsundoku","email":"satyendra.n.sinha@gmail.com"},{"name":"machyne","email":"mcotter222@gmail.com"},{"name":"micheal.parks","email":"michealparks1989@gmail.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"pzrq","email":"peter@peterjs.com"},{"name":"redondos","email":"aolivera@gmail.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"schwartzrw","email":"schwartzrw@gmail.com"},{"name":"shum","email":"chris.shum@mongodb.com"}],"homepage":"https://github.com/mongodb-js/index-model","bugs":{"url":"https://github.com/mongodb-js/index-model/issues"},"dist":{"shasum":"7733bf0ba554c7ecdb401138070f57d52a1d4f5f","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.6.3.tgz","integrity":"sha512-Z2gto4bLP0L/JAEtFANw06xsPDqYALcrc5Myebnm4e7dUEQ8wqb/3mKUcEwdwjnltyesFvviHGXm89OQOYf4+g==","signatures":[{"sig":"MEQCIBIxRIO6fN2tySTLr+HTfd0+QOcnVjjJySvySW/UkFsYAiBUUAFtkywGqs/gvw3qPTxavOa3lvM0H8Tw1bpWx7AIbw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"_from":".","_shasum":"7733bf0ba554c7ecdb401138070f57d52a1d4f5f","gitHead":"063af69d9b3496a30d23f2402f8f57161687f33c","scripts":{"ci":"npm run check && npm test","fmt":"mongodb-js-fmt test/*.js bin/*.js index.js","test":"mocha","check":"mongodb-js-precommit","pretest":"mongodb-runner install && mongodb-runner start","posttest":"mongodb-runner stop"},"_npmUser":{"name":"pzrq","email":"peter@peterjs.com"},"precommit":["check"],"repository":{"url":"git+https://github.com/mongodb-js/index-model.git","type":"git"},"_npmVersion":"3.10.9","description":"MongoDB index model.","directories":{},"_nodeVersion":"6.9.1","dependencies":{"async":"^1.5.2","lodash":"^4.8.2","triejs":"github:rueckstiess/triejs","mongodb":"^2.2.11","mongodb-ns":"^1.0.3","ampersand-model":"^6.0.2","mongodb-js-errors":"^0.2.1","ampersand-collection":"^1.6.1","ampersand-rest-collection":"^5.0.0"},"devDependencies":{"debug":"^2.2.0","mocha":"^3.1.2","pre-commit":"^1.1.2","mongodb-js-fmt":"^0.0.3","mongodb-runner":"^3.3.2","mongodb-js-precommit":"^0.2.9","eslint-config-mongodb-js":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model-0.6.3.tgz_1479965948419_0.9465913618914783","host":"packages-12-west.internal.npmjs.com"}},"0.6.4":{"name":"mongodb-index-model","version":"0.6.4","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"Apache-2.0","_id":"mongodb-index-model@0.6.4","maintainers":[{"name":"aherlihy","email":"anna@mongodb.com"},{"name":"brahmgardner","email":"brahm.gardner@gmail.com"},{"name":"cilix","email":"matthewlevenstein@gmail.com"},{"name":"dpercy","email":"davetp425@gmail.com"},{"name":"durran","email":"durran@gmail.com"},{"name":"glowe","email":"graham.lowe@gmail.com"},{"name":"i80and","email":"i80and@foxquill.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"},{"name":"jsmulrow","email":"jack.mulrow@gmail.com"},{"name":"justinjmoses","email":"justinjmoses@gmail.com"},{"name":"kay-kim","email":"kay@mongodb.com"},{"name":"keyboardtsundoku","email":"satyendra.n.sinha@gmail.com"},{"name":"machyne","email":"mcotter222@gmail.com"},{"name":"micheal.parks","email":"michealparks1989@gmail.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"pzrq","email":"peter@peterjs.com"},{"name":"redondos","email":"aolivera@gmail.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"schwartzrw","email":"schwartzrw@gmail.com"},{"name":"shum","email":"chris.shum@mongodb.com"}],"homepage":"https://github.com/mongodb-js/index-model","bugs":{"url":"https://github.com/mongodb-js/index-model/issues"},"dist":{"shasum":"49368cdbddd027290ffc1e5147fb3b18301f2511","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.6.4.tgz","integrity":"sha512-AHCuAjh3FfVjyBWK5E5GC/Dk+GwtULkeH6AYnHMqpGrIlRUHdpi0ZGuxRXpEzLFQG1DLRZZ2ziDlBdb0WmjKlA==","signatures":[{"sig":"MEYCIQD5dVMQwPqWLhZrtPXOpYOxGGEx2SlcMkyizO+UZiykrgIhAL6rc0ul2F34+5mjAAr13m8fK1SSN3k/cwg0/42KtNpm","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"_from":".","_shasum":"49368cdbddd027290ffc1e5147fb3b18301f2511","gitHead":"142ac69a10025a658d14b5b448a4d2c4811e4f6a","scripts":{"ci":"npm run check && npm test","fmt":"mongodb-js-fmt test/*.js bin/*.js index.js","test":"mocha","check":"mongodb-js-precommit","pretest":"mongodb-runner install"},"_npmUser":{"name":"pzrq","email":"peter@peterjs.com"},"precommit":["check"],"repository":{"url":"git+https://github.com/mongodb-js/index-model.git","type":"git"},"_npmVersion":"3.10.10","description":"MongoDB index model.","directories":{},"_nodeVersion":"6.9.4","dependencies":{"async":"^1.5.2","lodash":"^4.8.2","triejs":"github:rueckstiess/triejs","mongodb":"^2.2.11","mongodb-ns":"^1.0.3","ampersand-model":"^6.0.2","mongodb-js-errors":"^0.2.1","ampersand-collection":"^1.6.1","ampersand-rest-collection":"^5.0.0"},"devDependencies":{"debug":"^2.2.0","mocha":"^3.1.2","pre-commit":"^1.1.2","mongodb-js-fmt":"^0.0.3","mongodb-runner":"^3.3.2","mongodb-js-precommit":"^0.2.9","eslint-config-mongodb-js":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model-0.6.4.tgz_1486102002239_0.30641460651531816","host":"packages-12-west.internal.npmjs.com"}},"0.6.5":{"name":"mongodb-index-model","version":"0.6.5","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"Apache-2.0","_id":"mongodb-index-model@0.6.5","maintainers":[{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"},{"name":"terakilobyte","email":"terakilobyte@gmail.com"},{"name":"jimol","email":"jim.oleary@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"mpobrien","email":"mpobrien005@gmail.com"},{"name":"christkv","email":"christkv@gmail.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"keyboardtsundoku","email":"satyendra.n.sinha@gmail.com"},{"name":"pzrq","email":"peter@peterjs.com"},{"name":"justinjmoses","email":"justinjmoses@gmail.com"},{"name":"aherlihy","email":"anna@mongodb.com"},{"name":"redondos","email":"aolivera@gmail.com"},{"name":"dpercy","email":"davetp425@gmail.com"},{"name":"cilix","email":"matthewlevenstein@gmail.com"},{"name":"kay-kim","email":"kay@mongodb.com"},{"name":"glowe","email":"graham.lowe@gmail.com"},{"name":"micheal.parks","email":"michealparks1989@gmail.com"},{"name":"schwartzrw","email":"schwartzrw@gmail.com"},{"name":"durran","email":"durran@gmail.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"}],"homepage":"https://github.com/mongodb-js/index-model","bugs":{"url":"https://github.com/mongodb-js/index-model/issues"},"dist":{"shasum":"c69a6a7de83899b3b9fed2141592777d42d3caff","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.6.5.tgz","integrity":"sha512-iEmgRrUFUyAbbsVnaACcWzNtpa7g/VeGFg65YjrjTLwBp4g3rjMbtqr/yHkJhJtvL3GeWoHvnRb5DtgGuI4mjA==","signatures":[{"sig":"MEUCIQCGRTVxNza03JlYQbkq5M6k0IUZRY8OqtIZlTEfsCBKOgIgPrMayqyoN+jNRPZ8UY5rEdvU5hTpH6W1HsIFTT0MSsE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"_from":".","_shasum":"c69a6a7de83899b3b9fed2141592777d42d3caff","gitHead":"cc6b9a956d50db624de19a9ce958b997813dd5a0","scripts":{"ci":"npm run check && npm test","fmt":"mongodb-js-fmt test/*.js bin/*.js index.js","test":"mocha","check":"mongodb-js-precommit","pretest":"mongodb-runner install"},"_npmUser":{"name":"pzrq","email":"peter@peterjs.com"},"precommit":["check"],"repository":{"url":"git+https://github.com/mongodb-js/index-model.git","type":"git"},"_npmVersion":"4.0.5","description":"MongoDB index model.","directories":{},"_nodeVersion":"7.4.0","dependencies":{"async":"^1.5.2","lodash":"^4.8.2","triejs":"github:rueckstiess/triejs","mongodb":"^2.2.11","mongodb-ns":"^2.0.0","ampersand-model":"^6.0.2","mongodb-js-errors":"^0.2.1","ampersand-collection":"^1.6.1","ampersand-rest-collection":"^5.0.0"},"devDependencies":{"debug":"^2.2.0","mocha":"^3.1.2","pre-commit":"^1.1.2","mongodb-js-fmt":"^0.0.3","mongodb-runner":"^3.3.2","mongodb-js-precommit":"^0.2.9","eslint-config-mongodb-js":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model-0.6.5.tgz_1496632466963_0.6382880480960011","host":"s3://npm-registry-packages"}},"1.0.0":{"name":"mongodb-index-model","version":"1.0.0","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"Apache-2.0","_id":"mongodb-index-model@1.0.0","maintainers":[{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"},{"name":"danulf","email":"danagroff@hotmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"jlord","email":"to.jlord@gmail.com"},{"name":"terakilobyte","email":"terakilobyte@gmail.com"},{"name":"jimol","email":"jim.oleary@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"mpobrien","email":"mpobrien005@gmail.com"},{"name":"christkv","email":"christkv@gmail.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"pzrq","email":"peter@peterjs.com"},{"name":"justinjmoses","email":"justinjmoses@gmail.com"},{"name":"aherlihy","email":"anna@mongodb.com"},{"name":"redondos","email":"aolivera@gmail.com"},{"name":"dpercy","email":"davetp425@gmail.com"},{"name":"cilix","email":"matthewlevenstein@gmail.com"},{"name":"kay-kim","email":"kay@mongodb.com"},{"name":"glowe","email":"graham.lowe@gmail.com"},{"name":"micheal.parks","email":"michealparks1989@gmail.com"},{"name":"schwartzrw","email":"schwartzrw@gmail.com"},{"name":"durran","email":"durran@gmail.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"}],"homepage":"https://github.com/mongodb-js/index-model","bugs":{"url":"https://github.com/mongodb-js/index-model/issues"},"dist":{"shasum":"b6f0a96236b3bd31ce7dab5f868ec7384d732407","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-1.0.0.tgz","integrity":"sha512-ND0QlK7yJ9fFnMYhgBJR1i/HUSxmJi4s862xQTAETAZ1yyCgLDMUhrX574/hKCl9D4DLHmZPrKmPiG9EwNyxSg==","signatures":[{"sig":"MEUCIQCZR0TWTBy+N5RgxJ5kyYXWR0+OsZXJqiF6o+s8AR/aTwIgd1XvGXi7qM/Ig1yQYDMjI9u6Agfm1IxAoOmu0DAzEg0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"_from":".","_shasum":"b6f0a96236b3bd31ce7dab5f868ec7384d732407","gitHead":"58978cf7f5796a31b033031baf7d7183a4bdb6b5","scripts":{"ci":"npm run check && npm test","fmt":"mongodb-js-fmt test/*.js bin/*.js index.js","test":"mocha","check":"mongodb-js-precommit","pretest":"mongodb-runner install"},"_npmUser":{"name":"durran","email":"durran@gmail.com"},"precommit":["check"],"repository":{"url":"git+https://github.com/mongodb-js/index-model.git","type":"git"},"_npmVersion":"4.0.5","description":"MongoDB index model.","directories":{},"_nodeVersion":"7.4.0","dependencies":{"async":"^1.5.2","lodash":"^4.8.2","triejs":"github:rueckstiess/triejs","mongodb":"^2.2.11","mongodb-ns":"^2.0.0","ampersand-model":"^6.0.2","mongodb-js-errors":"^0.2.1","ampersand-collection":"^1.6.1","ampersand-rest-collection":"^5.0.0"},"devDependencies":{"debug":"^2.2.0","mocha":"^3.1.2","pre-commit":"^1.1.2","mongodb-js-fmt":"^0.0.3","mongodb-runner":"^3.3.2","mongodb-js-precommit":"^0.2.9","eslint-config-mongodb-js":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model-1.0.0.tgz_1500999698206_0.5023327735252678","host":"s3://npm-registry-packages"}},"2.0.0":{"name":"mongodb-index-model","version":"2.0.0","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"Apache-2.0","_id":"mongodb-index-model@2.0.0","maintainers":[{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"},{"name":"lrlna","email":"shestak.irina@gmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"diodredd","email":"diodredd@gmail.com"},{"name":"jrbalsano","email":"jrbalsano@gmail.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"daprahamian","email":"dan.aprahamian@gmail.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"jlord","email":"to.jlord@gmail.com"},{"name":"terakilobyte","email":"terakilobyte@gmail.com"},{"name":"jimol","email":"jim.oleary@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"mpobrien","email":"mpobrien005@gmail.com"},{"name":"christkv","email":"christkv@gmail.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"pzrq","email":"peter@peterjs.com"},{"name":"justinjmoses","email":"justinjmoses@gmail.com"},{"name":"aherlihy","email":"anna@mongodb.com"},{"name":"redondos","email":"aolivera@gmail.com"},{"name":"dpercy","email":"davetp425@gmail.com"},{"name":"cilix","email":"matthewlevenstein@gmail.com"},{"name":"kay-kim","email":"kay@mongodb.com"},{"name":"glowe","email":"graham.lowe@gmail.com"},{"name":"micheal.parks","email":"michealparks1989@gmail.com"},{"name":"schwartzrw","email":"schwartzrw@gmail.com"},{"name":"durran","email":"durran@gmail.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"}],"homepage":"https://github.com/mongodb-js/index-model","bugs":{"url":"https://github.com/mongodb-js/index-model/issues"},"dist":{"shasum":"79d057d30d25e6dc3a87642362768e0fa8333eb8","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-2.0.0.tgz","integrity":"sha512-Gn0m6eydlKBakfaLdPmX/HN+MRnNvEGeIWEsp88ivkh4ifatAO2FjQD6vtzxTxXVzgSBENVkMGD49/xl5sIkWg==","signatures":[{"sig":"MEQCIB9Haj5NEN7+sFeAjKgFpwnBynVe/75inc1mnuMafFd9AiBLqCFVbngwFhMGGLyZsl72peGXisLHqClA847O1tqtSg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"_from":".","_shasum":"79d057d30d25e6dc3a87642362768e0fa8333eb8","gitHead":"34fbf48ca8a453fa8ede638ebc12b4e96787a9d6","scripts":{"ci":"npm run check && npm test","fmt":"mongodb-js-fmt test/*.js bin/*.js index.js","test":"mocha","check":"mongodb-js-precommit","pretest":"mongodb-runner install"},"_npmUser":{"name":"durran","email":"durran@gmail.com"},"precommit":["check"],"repository":{"url":"git+https://github.com/mongodb-js/index-model.git","type":"git"},"_npmVersion":"4.2.0","description":"MongoDB index model.","directories":{},"_nodeVersion":"7.9.0","dependencies":{"async":"^1.5.2","lodash":"^4.8.2","triejs":"github:rueckstiess/triejs","mongodb":"^3.0.1","mongodb-ns":"^2.0.0","ampersand-model":"^6.0.2","mongodb-js-errors":"^0.2.1","ampersand-collection":"^1.6.1","ampersand-rest-collection":"^5.0.0"},"devDependencies":{"debug":"^2.2.0","mocha":"^3.1.2","pre-commit":"^1.1.2","mongodb-js-fmt":"^0.0.3","mongodb-runner":"^3.6.1","mongodb-js-precommit":"^0.2.9","eslint-config-mongodb-js":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model-2.0.0.tgz_1517048614525_0.33732831245288253","host":"s3://npm-registry-packages"}},"2.0.1":{"name":"mongodb-index-model","version":"2.0.1","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"Apache-2.0","_id":"mongodb-index-model@2.0.1","maintainers":[{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"},{"name":"lrlna","email":"shestak.irina@gmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"diodredd","email":"diodredd@gmail.com"},{"name":"jrbalsano","email":"jrbalsano@gmail.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"daprahamian","email":"dan.aprahamian@gmail.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"jlord","email":"to.jlord@gmail.com"},{"name":"terakilobyte","email":"terakilobyte@gmail.com"},{"name":"jimol","email":"jim.oleary@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"mpobrien","email":"mpobrien005@gmail.com"},{"name":"christkv","email":"christkv@gmail.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"pzrq","email":"peter@peterjs.com"},{"name":"justinjmoses","email":"justinjmoses@gmail.com"},{"name":"aherlihy","email":"anna@mongodb.com"},{"name":"redondos","email":"aolivera@gmail.com"},{"name":"dpercy","email":"davetp425@gmail.com"},{"name":"cilix","email":"matthewlevenstein@gmail.com"},{"name":"kay-kim","email":"kay@mongodb.com"},{"name":"glowe","email":"graham.lowe@gmail.com"},{"name":"micheal.parks","email":"michealparks1989@gmail.com"},{"name":"schwartzrw","email":"schwartzrw@gmail.com"},{"name":"durran","email":"durran@gmail.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"}],"homepage":"https://github.com/mongodb-js/index-model","bugs":{"url":"https://github.com/mongodb-js/index-model/issues"},"dist":{"shasum":"3f7faa0ba0df19a9e6c826e97b18d7841664a7e4","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-2.0.1.tgz","integrity":"sha512-YhmG1qlRxI86EmZ2N5BujbcRl7XcDp9L002CY1se8K0JKrzgkZmHey1PPI5vH1Qppm609ZRPsa5814l6o1blIg==","signatures":[{"sig":"MEUCICifHb4SC0NK8kis+7wSwjivAEFDrMThBY0fGgFL5k+QAiEA1MlKkaTX3yYiqhqw8OgF1C4CUSSBZg2EYdAusLJHv9o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"_from":".","_shasum":"3f7faa0ba0df19a9e6c826e97b18d7841664a7e4","gitHead":"10b5cafe11a213e3ceed5232c010b349104c07e3","scripts":{"ci":"npm run check && npm test","fmt":"mongodb-js-fmt test/*.js bin/*.js index.js","test":"mocha","check":"mongodb-js-precommit","pretest":"mongodb-runner install"},"_npmUser":{"name":"durran","email":"durran@gmail.com"},"precommit":["check"],"repository":{"url":"git+https://github.com/mongodb-js/index-model.git","type":"git"},"_npmVersion":"4.2.0","description":"MongoDB index model.","directories":{},"_nodeVersion":"7.9.0","dependencies":{"async":"^1.5.2","lodash":"^4.8.2","triejs":"github:rueckstiess/triejs","mongodb":"^3.0.1","mongodb-ns":"^2.0.0","ampersand-model":"^6.0.2","mongodb-js-errors":"^0.2.1","ampersand-collection":"^1.6.1","ampersand-rest-collection":"^5.0.0"},"devDependencies":{"debug":"^2.2.0","mocha":"^3.1.2","pre-commit":"^1.1.2","mongodb-js-fmt":"^0.0.3","mongodb-runner":"^3.6.1","mongodb-js-precommit":"^0.2.9","eslint-config-mongodb-js":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model-2.0.1.tgz_1517056396873_0.24099164130166173","host":"s3://npm-registry-packages"}},"2.1.0":{"name":"mongodb-index-model","version":"2.1.0","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"Apache-2.0","_id":"mongodb-index-model@2.1.0","maintainers":[{"name":"aherlihy","email":"anna@mongodb.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"christkv","email":"christkv@gmail.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"cilix","email":"matthewlevenstein@gmail.com"},{"name":"daprahamian","email":"dan.aprahamian@gmail.com"},{"name":"deepshah","email":"deepcshah@gmail.com"},{"name":"dpercy","email":"davetp425@gmail.com"},{"name":"durran","email":"durran@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"glowe","email":"graham.lowe@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"jimol","email":"jim.oleary@gmail.com"},{"name":"jon.franco","email":"jon.franco@mongodb.com"},{"name":"jrbalsano","email":"jrbalsano@gmail.com"},{"name":"justinjmoses","email":"justinjmoses@gmail.com"},{"name":"kay-kim","email":"kay@mongodb.com"},{"name":"lrlna","email":"shestak.irina@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"micheal.parks","email":"michealparks1989@gmail.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"mpobrien","email":"mpobrien005@gmail.com"},{"name":"pzrq","email":"peter@peterjs.com"},{"name":"redondos","email":"aolivera@gmail.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"sampoonachot","email":"joy.sampoonachot@10gen.com"},{"name":"samweaver","email":"samuel.james.weaver@gmail.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"schwartzrw","email":"schwartzrw@gmail.com"},{"name":"terakilobyte","email":"terakilobyte@gmail.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"}],"homepage":"https://github.com/mongodb-js/index-model","bugs":{"url":"https://github.com/mongodb-js/index-model/issues"},"dist":{"shasum":"7da95683f0fd8af3715c7e4e8a0d1ccca851cf7f","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-2.1.0.tgz","fileCount":11,"integrity":"sha512-SAaHuPExFNE718Z3Jp01bLP6KQVb0Q9Z1A/QOqNdDJ48DqU3cmfgQqvpUF22tAjt4nZ6RCZE+eHJVLlY2YbCdQ==","signatures":[{"sig":"MEUCIAYAAgHs18KwXLbXKPFiCXRcmDNszTGPZeenbJS5HeuoAiEAtCMMGk397RstMyU/D+jHa5ODvBSQyrjNjpvSaJrP8nc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":68436,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbO5hbCRA9TVsSAnZWagAAdF0P/iwD2CMquTxzeiAS1EYI\nzJGG9/WqpsD7AWm141rbvsgJv51/dNJ+qYDq4CdGuL1Cw8nQzKpfWha67Sgn\nt0bP8UU6Ys5ych+StwCG59YocSoOuVxZJiTS8XlKeP4N/KpGffcNHHxNVkv3\nl9AF76aDPAuHsI3/v4C4Brd6Mik+1rXFcTbiCd050X1yPkN6sIU2MqVQYofJ\nnPk6fNoWrXiba4o0zdw3NNlIWxWt1i6zq0gyNzazqmWkT72tL6rEKJylZbPq\n6kF4YkQV3X2FiaQ2H0hcGD37mZhU7vNY3gl+bCutfNOoSMdEUTqI31RVSTcK\ncDxfPs15NqQHFo8AvpW5U50JISj6d+qj1nD07kFwyQVLGgHLSg2vVCGNS5aD\n5TlMsQMxfQhmZpkggDKyC8a6F9yudRY9jDEgKPnQYI4w4SPuvq5JvaBagKlM\nJ0qg4mAERiUgTFNhYYJ+1oDAbsgL+4uQtZZyIkrFNdjHQSZuuekDmE1b2jUo\nh4go0Ru4XzkOOIrSXc0UmYiQzhiB5I5d9xq7Mbzvo+Bo8dBOLxdf97PsBA7L\naaVFvVVmI18WgICCuf9Z8U+qtmimviZW+qJ9qc5hPmxHt6urkmwY0uqxaP/r\nmpCNrcW2cZLZ1zbW2Rys0LCU0mRtBxuJbfYKyMx4Wm0hd1LWvD30chMBfNQh\ntBes\r\n=tZPn\r\n-----END PGP SIGNATURE-----\r\n"},"gitHead":"2fba1ecf39eafaed36855082fcf29df6cbdb0422","scripts":{"ci":"npm run check && npm test","fmt":"mongodb-js-fmt test/*.js bin/*.js index.js","test":"mocha","check":"mongodb-js-precommit","pretest":"mongodb-runner install"},"_npmUser":{"name":"durran","email":"durran@gmail.com"},"precommit":["check"],"repository":{"url":"git+https://github.com/mongodb-js/index-model.git","type":"git"},"_npmVersion":"5.5.1","description":"MongoDB index model.","directories":{},"_nodeVersion":"8.9.3","dependencies":{"async":"^1.5.2","lodash":"^4.8.2","triejs":"github:rueckstiess/triejs","mongodb":"^3.1.0","mongodb-ns":"^2.0.0","ampersand-model":"^6.0.2","mongodb-js-errors":"^0.2.1","ampersand-collection":"^1.6.1","ampersand-rest-collection":"^5.0.0"},"_hasShrinkwrap":false,"devDependencies":{"debug":"^2.2.0","mocha":"^3.1.2","pre-commit":"^1.1.2","mongodb-js-fmt":"^0.0.3","mongodb-runner":"^3.6.1","mongodb-js-precommit":"^0.2.9","eslint-config-mongodb-js":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_2.1.0_1530632283618_0.9289858359211032","host":"s3://npm-registry-packages"}},"2.2.0":{"name":"mongodb-index-model","version":"2.2.0","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"Apache-2.0","_id":"mongodb-index-model@2.2.0","maintainers":[{"name":"aherlihy","email":"anna@mongodb.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"christkv","email":"christkv@gmail.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"cilix","email":"matthewlevenstein@gmail.com"},{"name":"daprahamian","email":"dan.aprahamian@gmail.com"},{"name":"deepshah","email":"deepcshah@gmail.com"},{"name":"dpercy","email":"davetp425@gmail.com"},{"name":"durran","email":"durran@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"glowe","email":"graham.lowe@gmail.com"},{"name":"gregg.b","email":"gregg.brewster@mongodb.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"jimol","email":"jim.oleary@gmail.com"},{"name":"jon.franco","email":"jon.franco@mongodb.com"},{"name":"jrbalsano","email":"jrbalsano@gmail.com"},{"name":"justinjmoses","email":"justinjmoses@gmail.com"},{"name":"kay-kim","email":"kay@mongodb.com"},{"name":"lrlna","email":"shestak.irina@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"micheal.parks","email":"michealparks1989@gmail.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"mpobrien","email":"mpobrien005@gmail.com"},{"name":"redondos","email":"aolivera@gmail.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"sampoonachot","email":"joy.sampoonachot@10gen.com"},{"name":"samweaver","email":"samuel.james.weaver@gmail.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"schwartzrw","email":"schwartzrw@gmail.com"},{"name":"terakilobyte","email":"terakilobyte@gmail.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"}],"homepage":"https://github.com/mongodb-js/index-model","bugs":{"url":"https://github.com/mongodb-js/index-model/issues"},"dist":{"shasum":"85d723be78f84694baa2aa319b97b819575f8ac4","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-2.2.0.tgz","fileCount":11,"integrity":"sha512-5Dizp/9BYyc565e9AMayB8djmxq02yDPXTi+4jThmg+euCsCZp125tPYW/L5JHupV2a5amVhdXG9Sv6hRdWAeQ==","signatures":[{"sig":"MEQCICfBcRKMqhTxBjldZQ3DV+NbeD8p0nvzbXPGFAAYHh2SAiBsP1LKBblr7vIlNuu/lCxhRV6SVcoxRniBscr1vFrClQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":68436,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbhU5pCRA9TVsSAnZWagAAmOQP/RbYl6RJJY3Ytddkkglh\nS5TtNykMyCbj3lryW4ShF8YKae09+1sqtumXSOWxdiQJ2syl6uDwGxrS8Sgf\njrkMs2XbqRPCSvIcXezimdIHtjTLXdS1G3hn+rK6yDgPPEGXZnV4U/i3dr64\n2M0AP2yWHQgjST/T2ipfg1yGDaPF3ubIb/aHwSBMLfcWad4kFmnijo7JNsxZ\ndZ//oxrGyy8FI7pGJinlkEJZ0QRCRfnjYPNbfpBuiVKlm82jF0R4S4hppC/p\ne44S3CfR7BTnYAZd63cQX9f4k0TNhfPNyRQPrrfV1TMUwEQ/oL6aSYNUEuO6\n++yjPyl9rRzjZhIKJ//i/A0ZnVumkfOS+29ZzVyVr/pNSTL6f6NY6LhqpQu9\nzUUOgULthog4eLvELWhbvWpeoMH2b7FSsPHlkoAWujzFMM6VK2LW+28tsDfl\nCIOyGB1JyZnXIskZnPDgtPYxfXQaf7j8IHdK428dH+qailMfQbhGVokpbskF\nSw7HeLSwpa60SC6wlnX69yyOV8BDoqi6v7/+GWqm1VE9MAaIfFkOArWnmo6I\nXjDT5op2AVdF591GIwlvd7UZbAvyXh/yKFRqd9hYHYxMrujvKKaNKjOEAxbS\nfTubYsTrOPkSnTwEcXL0wnzQ5w3VAnZ+HqKzetAyRtwYrerF1U8w03VgofhV\nAp/e\r\n=DAVS\r\n-----END PGP SIGNATURE-----\r\n"},"gitHead":"c28759680fe83b80c56c068370a55e760d637af9","scripts":{"ci":"npm run check && npm test","fmt":"mongodb-js-fmt test/*.js bin/*.js index.js","test":"mocha","check":"mongodb-js-precommit","pretest":"mongodb-runner install"},"_npmUser":{"name":"durran","email":"durran@gmail.com"},"precommit":["check"],"repository":{"url":"git+https://github.com/mongodb-js/index-model.git","type":"git"},"_npmVersion":"5.5.1","description":"MongoDB index model.","directories":{},"_nodeVersion":"8.9.3","dependencies":{"async":"^1.5.2","lodash":"^4.8.2","triejs":"github:rueckstiess/triejs","mongodb":"^3.1.4","mongodb-ns":"^2.0.0","ampersand-model":"^6.0.2","mongodb-js-errors":"^0.2.1","ampersand-collection":"^1.6.1","ampersand-rest-collection":"^5.0.0"},"_hasShrinkwrap":false,"devDependencies":{"debug":"^2.2.0","mocha":"^3.1.2","pre-commit":"^1.1.2","mongodb-js-fmt":"^0.0.3","mongodb-runner":"^4.1.0","mongodb-js-precommit":"^0.2.9","eslint-config-mongodb-js":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_2.2.0_1535463017160_0.33678125429842165","host":"s3://npm-registry-packages"}},"2.3.0":{"name":"mongodb-index-model","version":"2.3.0","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"Apache-2.0","_id":"mongodb-index-model@2.3.0","maintainers":[{"name":"aherlihy","email":"anna@mongodb.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"cilix","email":"matthewlevenstein@gmail.com"},{"name":"daprahamian","email":"dan.aprahamian@gmail.com"},{"name":"deepshah","email":"deepcshah@gmail.com"},{"name":"dpercy","email":"davetp425@gmail.com"},{"name":"durran","email":"durran@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"glowe","email":"graham.lowe@gmail.com"},{"name":"gregg.b","email":"gregg.brewster@mongodb.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"jimol","email":"jim.oleary@gmail.com"},{"name":"jon.franco","email":"jon.franco@mongodb.com"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"kay-kim","email":"kay@mongodb.com"},{"name":"lrlna","email":"shestak.irina@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"micheal.parks","email":"michealparks1989@gmail.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"mpobrien","email":"mpobrien005@gmail.com"},{"name":"redondos","email":"aolivera@gmail.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"sampoonachot","email":"joy.sampoonachot@10gen.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"schwartzrw","email":"schwartzrw@gmail.com"},{"name":"terakilobyte","email":"terakilobyte@gmail.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"}],"homepage":"https://github.com/mongodb-js/index-model","bugs":{"url":"https://github.com/mongodb-js/index-model/issues"},"dist":{"shasum":"7b0ee10b9ad4f25164cae7d752cc0e1d5db870ad","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-2.3.0.tgz","fileCount":11,"integrity":"sha512-n1H7rrhXaIzWwMFRii4Hz770w2mTjDTiBxs/l9si19ryUtmOOOTV5xPzVoSso7Jmd94s69NXDO5dvmqnTbbqog==","signatures":[{"sig":"MEQCIGZwFwHSwHs8Zyk+/EqpZEzpGZi3HmfGBHidCwzX5B6cAiA2U413wqFgJsN8Iy9BoYv7ODU7gJadUa+wi+VHwLdrPg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":68436,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb4Zm2CRA9TVsSAnZWagAAAZ0P/ROlmztsqFjrbyZXXc/3\n+UUuOqu2N2EevFuATqWFe4bHTo1A5mXhj4x1tSMMR8Oq6nVegpHJzJVnE5Tb\nF54GjXNOfBAq0BaXIMs+tDIZTMJYGOcfdMNyTX/Ce5USx0gklizWkxfro+fl\n5iOaHIicsQcY4tKpRMzET+GNiVieMP3Aae/sGH1hofuinPq1p1CxYpJmhZ0h\nOiKliXZvuGPghV6iqOlQHS1uVIOB0wUrIOMera7dK9weswJGawvrNOrYPUNU\nKcSsYpAlMhyQgfTqn5YcMKUC99b3QacVB389tsc+wEtZASqx3+7K7/p0fPPE\nrVpgTguGrzC0tnTXY8DIRR8fWbWEoI+RLl+KijlGipWIwouh5dvnr33iLqtz\nGFd3iEPMVctubbIJvggNQTWYZRNwPok+un6RiSR4oSyLGfC1uXaKi9oU0mOB\ntF3vqA7n4lTolwJKdGjIvzhttcuYr+H3fOcCnx3S2/oSrLpZARjqcd760mDl\nqJGqNmQC+u7gqsEliCKzgT2C+QjgDRkkFycTlpzp6pm5MOt7tavp68JoJjpu\n12qNns7Yl3BZE5P3t4Sd68hcd6fw/rAlYZkVsyzus0k/FjNX1qsf0gnYxgXg\npe8CrWLA8YUKi3ihh9+PsweQZQJYp9+x5BoBw5OnF9LjRXunjBminQlTTq+e\nKiKx\r\n=yVCo\r\n-----END PGP SIGNATURE-----\r\n"},"gitHead":"0a687ad93e928cdfe5f66e5aeee4a32a71a73e35","scripts":{"ci":"npm run check && npm test","fmt":"mongodb-js-fmt test/*.js bin/*.js index.js","test":"mocha","check":"mongodb-js-precommit","pretest":"mongodb-runner install"},"_npmUser":{"name":"durran","email":"durran@gmail.com"},"precommit":["check"],"repository":{"url":"git+https://github.com/mongodb-js/index-model.git","type":"git"},"_npmVersion":"5.5.1","description":"MongoDB index model.","directories":{},"_nodeVersion":"8.9.3","dependencies":{"async":"^1.5.2","lodash":"^4.8.2","triejs":"github:rueckstiess/triejs","mongodb":"^3.1.9","mongodb-ns":"^2.0.0","ampersand-model":"^6.0.2","mongodb-js-errors":"^0.2.1","ampersand-collection":"^1.6.1","ampersand-rest-collection":"^5.0.0"},"_hasShrinkwrap":false,"devDependencies":{"debug":"^2.2.0","mocha":"^5.2.0","pre-commit":"^1.1.2","mongodb-js-fmt":"^0.0.3","mongodb-runner":"^4.6.0","mongodb-js-precommit":"^0.2.9","eslint-config-mongodb-js":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_2.3.0_1541511605936_0.4005419283232099","host":"s3://npm-registry-packages"}},"2.4.0":{"name":"mongodb-index-model","version":"2.4.0","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"Apache-2.0","_id":"mongodb-index-model@2.4.0","maintainers":[{"name":"aherlihy","email":"anna@mongodb.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"cilix","email":"matthewlevenstein@gmail.com"},{"name":"daprahamian","email":"dan.aprahamian@gmail.com"},{"name":"deafgoat","email":"deafgoat@gmail.com"},{"name":"deepshah","email":"deepcshah@gmail.com"},{"name":"dpercy","email":"davetp425@gmail.com"},{"name":"durran","email":"durran@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"glowe","email":"graham.lowe@gmail.com"},{"name":"gregg.b","email":"gregg.brewster@mongodb.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"jimol","email":"jim.oleary@gmail.com"},{"name":"jon.franco","email":"jon.franco@mongodb.com"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"kay-kim","email":"kay@mongodb.com"},{"name":"lrlna","email":"shestak.irina@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"micheal.parks","email":"michealparks1989@gmail.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"mpobrien","email":"mpobrien005@gmail.com"},{"name":"redondos","email":"aolivera@gmail.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"sampoonachot","email":"joy.sampoonachot@10gen.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"schwartzrw","email":"schwartzrw@gmail.com"},{"name":"terakilobyte","email":"terakilobyte@gmail.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"}],"homepage":"https://github.com/mongodb-js/index-model","bugs":{"url":"https://github.com/mongodb-js/index-model/issues"},"dist":{"shasum":"218278bf28a8fed217b462d0d5556a181451ffb0","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-2.4.0.tgz","fileCount":11,"integrity":"sha512-a+3Vq480WdepbBVTd2eYYvN18ldGLfS10FYiFVWyXxENXxxLjuT/0pAMvh+GdxNE8DJ0MYl3s8BlE6M0np4Lgw==","signatures":[{"sig":"MEUCIQCeAbmYsRjIxYJmL5boKePIKPmeBzyETDMOGmupykTVqwIgQ0Vo8H3WSOX7yj8kv5Lp5v7omZByC3bAOVGsWGqhYHc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":68498,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcP2+nCRA9TVsSAnZWagAAB0cP/Rp8Zo1HYOXH1sEOdhhG\nF4XK2RzT7f8oBS3dhUAMlEBSq7f+yPrcfB/D5Lr+/qvPdZesN84LMlgii7oH\nOduIEvh54S3jbWxX2irrvd0FUQmQaF5Gf/CcfseqVk5TcyF4dVk2Mdk20s/u\nO0g99o857qFT28Q0p7yUeTe6dknOV+5P0N2ofsMks6ywB/FUAU0Bx1mv1n4x\nvdZHpp8OBQ579UNGMt8whg8QhsUBLJThyS1jcG4eIXRNB2hUaijSI7T7v6xZ\nBzrRIf/aN9eU2FOQ7w79ue2ul+Q/a6ud+4cs1rhURuQhbK4QEz7dOB66Lcgh\n33nhJ1A4cv/3o32b1eR7O0tv7DW2ztsJK5RBFbtF9Np3D3zdyWbiOcix3+9m\nkgVG1z43lu0RoAMqNbtfUvekZkpeqIlO4CAuf6jB7G5sgWzbR8HvqfU8gxM+\nNmNx/9UNf4pKG5kSEq1llmcY0FRpHu1Ph3hcFpT6bs5l+nl0vU7jfwwCXBFC\nZEeRMilADmQAfz6qunGwBJOeB7E/7cu4GgzaSIQ/xDPhTIxbSB2lrHDnom9k\nY+QgcUJ0ucdpNsj7duXu6guYtQ1JAx/uXaLgvsdI67KviflIeC/wabi4lu9p\n24TcWlwIEFnit4Uir0ZzjIvjWoG73quoTODUO+5lfkD5ec4//xds905MnLQm\nQUzj\r\n=eyKH\r\n-----END PGP SIGNATURE-----\r\n"},"gitHead":"43c878440e79299ee104b36d55c06aff63d8cf63","scripts":{"test":"mocha","check":"mongodb-js-precommit","pretest":"mongodb-runner install"},"_npmUser":{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/index-model.git","type":"git"},"_npmVersion":"6.5.0","description":"MongoDB index model.","directories":{},"_nodeVersion":"10.4.0","dependencies":{"async":"^1.5.2","lodash":"^4.8.2","triejs":"github:rueckstiess/triejs","mongodb":"^3.1.9","mongodb-ns":"^2.0.0","ampersand-model":"^6.0.2","mongodb-js-errors":"^0.4.0","ampersand-collection":"^1.6.1","ampersand-rest-collection":"^5.0.0"},"_hasShrinkwrap":false,"devDependencies":{"debug":"^2.2.0","mocha":"^5.2.0","mongodb-runner":"^4.7.1","mongodb-js-precommit":"^2.0.0","eslint-config-mongodb-js":"^3.0.1"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_2.4.0_1547661222591_0.3236674347906825","host":"s3://npm-registry-packages"}},"2.5.0":{"name":"mongodb-index-model","version":"2.5.0","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"Apache-2.0","_id":"mongodb-index-model@2.5.0","maintainers":[{"name":"aherlihy","email":"anna@mongodb.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"cilix","email":"matthewlevenstein@gmail.com"},{"name":"daprahamian","email":"dan.aprahamian@gmail.com"},{"name":"deafgoat","email":"deafgoat@gmail.com"},{"name":"deepshah","email":"deepcshah@gmail.com"},{"name":"dpercy","email":"davetp425@gmail.com"},{"name":"durran","email":"durran@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"glowe","email":"graham.lowe@gmail.com"},{"name":"gregg.b","email":"gregg.brewster@mongodb.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"jimol","email":"jim.oleary@gmail.com"},{"name":"jon.franco","email":"jon.franco@mongodb.com"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"kay-kim","email":"kay@mongodb.com"},{"name":"lrlna","email":"shestak.irina@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"micheal.parks","email":"michealparks1989@gmail.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"mpobrien","email":"mpobrien005@gmail.com"},{"name":"redondos","email":"aolivera@gmail.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"ryantimmons","email":"ryan@rytim.com"},{"name":"sampoonachot","email":"joy.sampoonachot@10gen.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"schwartzrw","email":"schwartzrw@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"terakilobyte","email":"terakilobyte@gmail.com"},{"name":"thomaslangston-mongodb","email":"thomas.langston@mongodb.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"}],"homepage":"https://github.com/mongodb-js/index-model","bugs":{"url":"https://github.com/mongodb-js/index-model/issues"},"dist":{"shasum":"795f352a7a318c08d407e332321214e5fda980c0","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-2.5.0.tgz","fileCount":17,"integrity":"sha512-1EEDG7M2NDIiogPWbCCUCDfoBSjX7r9XyHyusakzCYe69ciaTdkS29hh/By/2F5R7gfHr84IVxN4WKjg8k9BGA==","signatures":[{"sig":"MEYCIQCPlEzezCVWmjav/TRlVpBhPOydAl8vgnSLOgzr5yI/UgIhAPUAcGsLKpc+3di5rjAx/joGIGuq19J2qRhrlD9Xp49k","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":86147,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc+m6qCRA9TVsSAnZWagAAbr8QAKCBQ8P/ynTTqdYtTMk5\nW/TqsUE0XlT/3GKoVo9pDhT5qOM9Dl160+IGgEhB8qJa1SHdnJvgESii2cwK\nHYM4zF3TQXFMXmHBOrf8cblRFbGQkK7Zwwrceqa8PHvCczdB+9Mu7+y09a6r\nQWgHEzAOeYDuRYUdOxV4RXvuLC17en88nTee+WKgnWnW1vCegOlygeSiFlxS\nsPcmqlkcqQUn+5yeSDS6wjvowEi+W8eNcNgjhU8mPJ+g9c1Mo/7eRjiE6W+k\n1vf3m7JnGaZmXMGSpQvWsmnh+fAJE/TSh1NsGj6N0ZlQFn3PwSzbXXSZImEL\ntGGeZtZnlaZE+2xTxT+k9yQ+0Q3fJSIkLubMR5c9qXSV990rQgeg5o0jZZAF\nHmWCplXr53Ww/KQyhApT1J+uW5armjaSsxPRNGKgPpji4p9e+oQFYRvmsqp+\nGcpBCeCrZ/ssSiMAQt5v9Nl7CSs3Q3NrSU471u9DiDQ1+LdldTdtOw9Vdrwq\n973ea5V2MMlmhZeGKKo8RL8qgqn090/JwlvqOBWlrnLmDXiJKg/ALcFBS2Um\n7pzkfoSXL1M2ipalLkRjR1ZlIymWdap5FGGfS7BJa2qRF8YeviTwDnTV/pg7\n0G99Ovq5zW0z/nO/SFrL1Ixz3tGsuGQq1Z2bifzkTscHyXGD017l6M3c5ReK\nK84s\r\n=jvY6\r\n-----END PGP SIGNATURE-----\r\n"},"gitHead":"c8731b084927540582f691dd5c61fb5f8843ddca","scripts":{"test":"mocha","check":"mongodb-js-precommit","pretest":"mongodb-runner install"},"_npmUser":{"name":"aherlihy","email":"anna@mongodb.com"},"repository":{"url":"git+https://github.com/mongodb-js/index-model.git","type":"git"},"_npmVersion":"6.7.0","description":"MongoDB index model.","directories":{},"_nodeVersion":"10.2.1","dependencies":{"async":"^1.5.2","lodash":"^4.8.2","triejs":"github:rueckstiess/triejs","mongodb":"^3.1.9","mongodb-ns":"^2.0.0","ampersand-model":"^6.0.2","mongodb-js-errors":"^0.4.0","ampersand-collection":"^1.6.1","ampersand-rest-collection":"^5.0.0"},"_hasShrinkwrap":false,"devDependencies":{"debug":"^2.2.0","mocha":"^5.2.0","mongodb-runner":"^4.7.1","mongodb-js-precommit":"^2.0.0","eslint-config-mongodb-js":"^3.0.1"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_2.5.0_1559916201379_0.14161382950547075","host":"s3://npm-registry-packages"}},"2.6.0":{"name":"mongodb-index-model","version":"2.6.0","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"Apache-2.0","_id":"mongodb-index-model@2.6.0","maintainers":[{"name":"aherlihy","email":"anna@mongodb.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"brookescarlett","email":"brooke.yalof@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"durran","email":"durran@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"kay-kim","email":"kay@mongodb.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"lrlna","email":"shestak.irina@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"scottsidwell","email":"developer@scottsidwell.id.au"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"tomhollander","email":"tomhollander@hotmail.com"}],"homepage":"https://github.com/mongodb-js/index-model","bugs":{"url":"https://github.com/mongodb-js/index-model/issues"},"dist":{"shasum":"31018a10442300081ccfaf8243b7c6912b418e1f","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-2.6.0.tgz","fileCount":9,"integrity":"sha512-CS1kgCxLoya1ywgE85zHuvxQEo7cj934OZI4baNdahfWxo0L9CXzCVGZQdUcOW1r6y2dYk3heN8f5/d8rPYCWA==","signatures":[{"sig":"MEUCIBexv96y8sH9JZQUNcXyM7/dI5ShU4PK7u4rE2bN1oiyAiEAp97T0o5T0b/pdPg+q4rCCSl+EvgdVU/a7MVNcaXQC5E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":30353,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeYCxECRA9TVsSAnZWagAAl14P/2lx3MPyuGxnqWyNp8dm\nRaFK9i3uX+7XpGOAndQL3RKYUBJ9eEA6219M4H1q4YoxkxTW4aoAPOy33j3X\nZmxLX04DyBYmHZlXKs8/YspLfVFNSPFLxti339AQG9LjBzx2cQ9/Arp/K2PG\nznQk52ke+mfnGW3897P+wBSVi0Lam3Y5QtZVwoS3CxdBGP8kprQvtg08vEka\nnULsVR61QBdGhEGBcQrwzvVxEOFI7wqI7riW+PGP/UZLQmG6w/t7fD0lkB9d\nI+Rxch8m41nQtCZItU6W8y5GK2RzZ0lju92jQHBuwaBbeNWVj2vie6UHdkYC\nCEp/Y3vWNxvoQ9iZ1xeNMw+LyYso4nlMVQX6iNsTWB0vdHDddrZLDePxqg3n\n4Ex+GMM+8vsPhh/RWWlmV4tNEAgifCLm/Dk0VRxIT+NeLUn46n9FkBbmEjcu\nypsOa5qRwTl8UaCPrV2BYIQYmHlx0Aa1A3ewmMltM5a297yIQBVPAoWrVUA3\nyfsV+fV4SfOA0p+ZGskUmIwObXFEZEAO4ajawXcwpf3z/StDibMCNcH+KpX1\nVm81ImP7we2ncXL8ii8AnPMMUPXa3AcjoRaiAmrs/eTrwogMPGxQwo2qHN7z\nhGlVW2b7C4eY4dum4SNoOIDGqbdsw+4VPjBWf2EUtMQyfGLMPCIMO88W0Nk/\nHnaW\r\n=dI6x\r\n-----END PGP SIGNATURE-----\r\n"},"gitHead":"f64c07d49e4bbf49534bf6887e2fb4c909ddb663","scripts":{"test":"mocha","check":"mongodb-js-precommit","pretest":"mongodb-runner install"},"_npmUser":{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/index-model.git","type":"git"},"_npmVersion":"6.13.7","description":"MongoDB index model.","directories":{},"_nodeVersion":"12.4.0","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb":"^3.5.4","mongodb-ns":"^2.2.0","ampersand-model":"^6.0.2","mongodb-js-errors":"^0.5.0","@mongodb-js/triejs":"^0.1.5","ampersand-collection":"^1.6.1","ampersand-rest-collection":"^5.0.0"},"_hasShrinkwrap":false,"devDependencies":{"debug":"^4.1.1","mocha":"^7.1.0","mongodb-runner":"^4.8.0","mongodb-js-precommit":"^2.2.1","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_2.6.0_1583361092261_0.7828341093522557","host":"s3://npm-registry-packages"}},"2.6.1":{"name":"mongodb-index-model","version":"2.6.1","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"Apache-2.0","_id":"mongodb-index-model@2.6.1","maintainers":[{"name":"aherlihy","email":"anna@mongodb.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"brookescarlett","email":"brooke.yalof@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"durran","email":"durran@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"kay-kim","email":"kay@mongodb.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"lrlna","email":"shestak.irina@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"scottsidwell","email":"developer@scottsidwell.id.au"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"tomhollander","email":"tomhollander@hotmail.com"}],"homepage":"https://github.com/mongodb-js/index-model","bugs":{"url":"https://github.com/mongodb-js/index-model/issues"},"dist":{"shasum":"c642fc82892950838280e06f463d342ad97819e1","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-2.6.1.tgz","fileCount":9,"integrity":"sha512-F6CktBkd0U2uV1y8r6PhZQiKqAUND0HmZvlFMRqXnhPqGSI+SbiTaKxcwPUbXPzikGBSL8KaAujFGf/y41N0Tw==","signatures":[{"sig":"MEUCIQD3cgByvy9WXj4Py4lS/agWvLnNs6omSLwf/RqxV+BcAwIgaIwwZgG/ZiQNIfwb5qWKzk3H7UNA+a+nIKijlLFV1lo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":30480,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJelbUDCRA9TVsSAnZWagAA8R8P/34bLbDffGNyqbj8ZtBy\nIJ9Cfs820074BCalsGBtwovnw1esaq7Uqb5D3BgDbwbD/iRqry6ZldlaejId\nyVluZXe7DMpNK7vsw7CYyyKB6kPQhjGUjtrhNoYjBfIAMvOHgqY8UyiuEUx2\nf9BmYSZE2wwG3S2t4QnK4cFVUNU7LDBPqvEByVVIOwNWmjJIc1VK+xuvcKoO\nXh7VRqj38QLUgV8+L9tp4ItznxIND/W48k/1Roz7T4NepTcAQxIPd0cxmeen\nSxofvcx1qfw5nIkP90Ojh45G7+IIjAaKJBNkfWI4QQcojMHLynOS4EQV2O2Q\nH0bHZKJmx+uXGJ8MI6uUYqQ6fN8JjZefA6092WpUsVNUBXTr0JtHvEKlxk0Z\n6C3rlm+zgX0hvjIgtOb0NwtqLv0nJ//o1uRn8OQtF5aDi4vdGYs+3uj3GryU\njY2S5eOjUhm6iscXu8V2aFVSDCPL6chP2s8wGKfYwA4qrnGgcbA2p+GpG9JR\ngEtHNX430fwoiTWtBkBCLYxVtllIAMVaX9LU/ERp1vptlnLTKS6gAGFYdxcN\nCUBp53fSm5N8q/c84uJLmd3yA1FB8Rxxv58iNlGB4yeIl+YPHpljGn3HtkBg\n85iu3KowwruasK5hbvms43duouBcvHz3eRiT9ToDNj+0znkOT8r0UKiS3mpG\nBaWp\r\n=bJ6B\r\n-----END PGP SIGNATURE-----\r\n"},"gitHead":"b255728b030fe0b7b34a54cebab5396dd3c99221","scripts":{"test":"mocha","check":"mongodb-js-precommit","pretest":"mongodb-runner install"},"_npmUser":{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/index-model.git","type":"git"},"_npmVersion":"6.14.2","description":"MongoDB index model.","directories":{},"_nodeVersion":"12.4.0","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb":"^3.5.4","mongodb-ns":"^2.2.0","ampersand-model":"^6.0.2","mongodb-js-errors":"^0.5.0","@mongodb-js/triejs":"^0.1.5","ampersand-collection":"^1.6.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"devDependencies":{"debug":"^4.1.1","mocha":"^7.1.0","mongodb-runner":"^4.8.0","mongodb-js-precommit":"^2.2.1","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_2.6.1_1586869505909_0.7990995509972862","host":"s3://npm-registry-packages"}},"2.7.0":{"name":"mongodb-index-model","version":"2.7.0","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"Apache-2.0","_id":"mongodb-index-model@2.7.0","maintainers":[{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"aherlihy","email":"anna@mongodb.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"lrlna","email":"shestak.irina@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"brookescarlett","email":"brooke.yalof@mongodb.com"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"team-compass@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"rosem","email":"michael_rose@gmx.de"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/index-model","bugs":{"url":"https://github.com/mongodb-js/index-model/issues"},"dist":{"shasum":"e7a743557a291ac53296159809431fb62410f154","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-2.7.0.tgz","fileCount":9,"integrity":"sha512-l2HigOjFZeffwAT4ipArJNFnzF426IfK+jTJleJBoVraqlUvcUYXtqhzxsv69wsWftjOjnWnpV6CXaSW1DgqoA==","signatures":[{"sig":"MEYCIQDMr0+j7QdRQxqD/Fs6KqYXWY60t8B9t51EcCz4Y9RmRgIhAM5y2K/UBlotI131aDPKjMkq6yaY0NnG4woLjvaaeD+q","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":30911,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrpB/CRA9TVsSAnZWagAAPBEP/AnfqGH9CsoatYtKiwBi\nrt6L9UlPZPqW3U7SDZx/d66xl6moDP6Q8TrQ/ExRRcMLm6nJP3dt4fm5+38Q\nq1xGJJ/H5H1g+zXve465gH9mwezDmzAvFOy8nYMSWX35Mv5cJ/eNTRKvCBj0\nQj/+2+BjAo/hNjljSq/1TSDLN8MfVpUfrEVo0MZde5QhqAMLZNMSalFjMcMh\n5ncvsMk5/+BB08apNK2Sutiq+urJjPwR6UYLVUf1c4zzV2/A/M7CHEQIF00e\n2YK3VeriyCUUMBJZ9ZBiYQ80xRNoeTbe+JFa2959AKluZwNON6YijC8V1IzA\nIJNlKdpRMy4l+1+TZD440/pcuv9uSxqEFE5HNXENkG012jZKzscWKUlFt0FK\nJv8MYnPu5myoDYXzLcMYh+8OoEMonlHwopjuLpiuS2uaU+78kc5SGF0VnzPo\nmTdLMEUI/6rGWv/ugnzmuquAR0bO2GvqHQwRG33cbkPqc0AzKI3vJH2B0Yec\nq6kZz4DW6j44bXrHwjoDGuAjB34Avd9BCxQl9v3mThBRXChh5InQ+ukR7yq/\nKRwfQBk8AIkypTQVNrHAHaOOY+GkDWZauZeWwW2M2QXGqZZCUvLI1Swcp3HF\n1X16F5hv+4MUjWIjz0RnuSbyJpsitqMVlDuk277CqUy9osJjPDhBBSYkR2r8\nrJDZ\r\n=0RIn\r\n-----END PGP SIGNATURE-----\r\n"},"gitHead":"170c704d3e22d335d5bf380dafe2b87569d7c4be","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install","test-ci":"npm run test","depcheck":"depcheck || echo \"!!! Dependency check failed, but the failure is ignored by now. This should be addressed in COMPASS-4772 !!!\"","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/index-model.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v12.18.4+x64 (darwin)","description":"MongoDB index model.","directories":{},"_nodeVersion":"12.18.4","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb":"^3.5.4","mongodb-ns":"^2.2.0","ampersand-model":"^6.0.2","mongodb-js-errors":"^0.5.0","@mongodb-js/triejs":"^0.2.0","ampersand-collection":"^1.6.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"devDependencies":{"debug":"^4.1.1","mocha":"^7.1.0","eslint":"^7.25.0","depcheck":"^1.4.0","mongodb-runner":"^4.8.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_2.7.0_1622052990724_0.32898770369937647","host":"s3://npm-registry-packages"}},"2.7.1":{"name":"mongodb-index-model","version":"2.7.1","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"Apache-2.0","_id":"mongodb-index-model@2.7.1","maintainers":[{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"aherlihy","email":"anna@mongodb.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"lrlna","email":"shestak.irina@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"brookescarlett","email":"brooke.yalof@mongodb.com"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"team-compass@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"rosem","email":"michael_rose@gmx.de"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/index-model","bugs":{"url":"https://github.com/mongodb-js/index-model/issues"},"dist":{"shasum":"6ed4618209bada9e7acc7e510fad24ebac89ed6f","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-2.7.1.tgz","fileCount":9,"integrity":"sha512-i0915w0SCHO1O92vP2MVzgW7Uvtd+ah6ihOZsmaE6J7X82+VWGnkFOU7+yBccrWhwO+Onx5kukqO/Z7B8Rvzig==","signatures":[{"sig":"MEUCIAVmjORCOt0F1zTik6fNQ3EP8YL1sG6taFegDGCRc3bkAiEA8IZB5dxtGeIrnKgEv/h1wuA8vV4SFutqXg75EVuokYQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":30854,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgr8NqCRA9TVsSAnZWagAAXtAP/jtAOYOhq5Ms0W5xynkM\n2UZ8AnPLvsgcLfBUOooFGWdjnLvrspVWeY9m0fg8Mg3M8KKU0jGn/UILuoLg\n1wDFm6AOqlww1IVXYYL+QJFonDdzIPL5o+jiX+QiVHy63H+mvVCFiv9QHGew\nUK0Rgo/LQwAL01k9O3XGipwQYdi+UqlbV0lergxiOMffgkXO44JYLZUlNm+6\nXVezsYVS1lrJo3p31KHrSN+Hx3kYn/ok3trK7UE4YWZ+ODZ4DBHqzBFGU/8P\nWCJ3uyIOKRlr92cT8ruWiMm/5LFI2cXsMUMZRPA+tRi8mF+YydiR5Y9JhqVy\nWUU4cg6dWimVmsImOfH+wb47H7blv0nIi9pUX0lwmK9dWybXp0R1uVyfWztF\ndOVMM+jwNa5mEYuU3QdkaYwgXVNFTGny6Uy9HUdCEjwVOvfSHv6xCNJReCQY\nTDfUaVBmUJt72IwtwgAtCescsKgYmdmH8q5LyE0KhhrTIg65pkegK4qnPorn\no+vAj3F1xBptj2ONG7OWskkzNnHtQ4buozi0wkP8viMzxVh9aChfep4koBT7\n2YNeFaMrCnwatjm4wVJHtL33hqYVbt4ftu7ZHBtHGk04ADgeWuUIQNaubdWF\n46b/xBqRl2Cx24rjYbtpizopLIAAzmMIx18u6NmFsP7ua6yUgTu1aXbZokOc\nqDrU\r\n=ZhwP\r\n-----END PGP SIGNATURE-----\r\n"},"scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install","test-ci":"npm run test","depcheck":"depcheck || echo \"!!! Dependency check failed, but the failure is ignored by now. This should be addressed in COMPASS-4772 !!!\"","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/index-model.git","type":"git"},"_npmVersion":"6.14.6","description":"MongoDB index model.","directories":{},"_nodeVersion":"12.18.4","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb":"^3.5.4","mongodb-ns":"^2.2.0","ampersand-model":"^6.0.2","mongodb-js-errors":"^0.5.0","@mongodb-js/triejs":"^0.2.1","ampersand-collection":"^1.6.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"devDependencies":{"debug":"^4.1.1","mocha":"^7.1.0","eslint":"^7.25.0","depcheck":"^1.4.0","mongodb-runner":"^4.8.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_2.7.1_1622131561604_0.8536741500304468","host":"s3://npm-registry-packages"}},"3.0.0":{"name":"mongodb-index-model","version":"3.0.0","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@3.0.0","maintainers":[{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"aherlihy","email":"anna@mongodb.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"lrlna","email":"shestak.irina@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"brookescarlett","email":"brooke.yalof@mongodb.com"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"team-compass@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"rosem","email":"michael_rose@gmx.de"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/index-model","bugs":{"url":"https://github.com/mongodb-js/index-model/issues"},"dist":{"shasum":"88ca425f08db22908a9eea228a121a1e6e66d451","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-3.0.0.tgz","fileCount":7,"integrity":"sha512-WP4RT5pkA+R3aLVfFcdIM4+5EjM4XxbW8oEh9otEpxzasGi/VYAon55N3rOdysxXkwK8TMIOaMR2+QimfJxaIA==","signatures":[{"sig":"MEQCIF57pgdkpxAlFNNyUvMZeV4Wsgw6GH4XXt8obGSCP+HsAiBBqiNkrtCLOy3Nbjk/Gt0euAVZEssbTmtWsZ+z1N18QA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":16039,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJguQrRCRA9TVsSAnZWagAAMA4P/3mKmsn7+4erAKGIeMVi\neXQjDpLBZQNZBB4ecPCbbxWj4HBZnChiCScCj5yKGDVbpitPTZF8wixrhdJH\njsIUecyXSlUzy8bxR5zGsZHuYVqah0Luh1O9nem+ZFQzqu+mNL6q04U59krQ\nY2r2LeOH+6rzEPZ8AFXdEg9dL4jURdD+lH6B6UGWPsUV9JpmQUcRXxU3KgGG\n1xkqp81Tgb5zQiWkCruYNhOy+ljvKoULlYmtrPlRKt4EH4LU6PDCkLxKSo5c\nNtl7muuVVTzuedESbTqHDUdWXJoWKa+4NDL52SgNIJsDvxKm3EX3ozDhCWL6\nNxyzfXop3OOG0ctHfkxNNX+IqmvL2QA+SA818WOihRUR9i5te8IQ1LF4N6rd\nwxPB4rsedgPCFCXj7zQNhp6MJrwR9jIh5hFLw/XyV/Z3NqJfzLF8EPmBRAef\ngZ7m0kdu6WXTlIUFDCIX4iPjnQUVe3dcLndHWAtwLpo39MmBvK4LrJKx/uhm\nP5cELOgbbdTIW6OavV3K3W6uNfh3ZA0CwliM8FBQPsWHVrSte2yKH/K/gw1w\n3j4ECv+sAPl/tSx63RdQzj05NHTOxiOF04gBq88oSV1RYp0+vwStgDm+7azT\nOQaxO5SLPZ7NJgfgDwVLyWISzUoW2jhYWbwPqaV1pOvFQwMz2TN0iat2QpBn\nMtdx\r\n=sSto\r\n-----END PGP SIGNATURE-----\r\n"},"scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install","test-ci":"npm run test","depcheck":"depcheck || echo \"!!! Dependency check failed, but the failure is ignored by now. This should be addressed in COMPASS-4772 !!!\"","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/index-model.git","type":"git"},"_npmVersion":"6.14.6","description":"MongoDB index model.","directories":{},"_nodeVersion":"12.18.4","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb":"^3.5.4","mongodb-ns":"^2.2.0","ampersand-model":"^6.0.2","mongodb-js-errors":"^0.5.0","ampersand-collection":"^1.6.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"devDependencies":{"debug":"^4.1.1","mocha":"^7.1.0","eslint":"^7.25.0","depcheck":"^1.4.0","mongodb-runner":"^4.8.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_3.0.0_1622739665655_0.0011681806712151577","host":"s3://npm-registry-packages"}},"3.1.0":{"name":"mongodb-index-model","version":"3.1.0","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@3.1.0","maintainers":[{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"brookescarlett","email":"brooke.yalof@mongodb.com"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"team-compass@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"rosem","email":"michael_rose@gmx.de"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/index-model","bugs":{"url":"https://github.com/mongodb-js/index-model/issues"},"dist":{"shasum":"a195d4384846d1ea3d41770d741bae2b41580bda","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-3.1.0.tgz","fileCount":8,"integrity":"sha512-kKTS5SA4KzTWR3vZNryRPBEQ7YUkYACUGBsvYgrx/N9r1auRb+mFhySP94q25WngywEdvQiBpyYEBjQF5zFP+g==","signatures":[{"sig":"MEYCIQDSOBasiVFCz8q3U61FR75IUxNs7pJJaX68yVPEeSXzMwIhALfm85ibach6nhycfUBjJu6Q1H9ugp/ueH2/KqPucvN4","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":46506,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgyjbwCRA9TVsSAnZWagAAZCIP/Rq/d5uyVkuhmkXqWLrw\nLCb1fCd4SWCmFGEuI96+D+aFllUM93hbaNYjTOfQIhSccwpbMfcW/DOj8jb7\nreSvGwqtWtY1ae2IlQTbWrA0ygnzsE7u3Aq0Faa9PJB+3j27p/d3dE1Cwzm2\nXPSuHMv1ioYVBbIUyLDjtZYAZABqot7UCXqm/X52xUA02+bXwgaVOlcmN52g\nekcCRjoDs15hSPJob5rqOlGa8Bv6oyZzZOG5CqwJ8tlmEB5ILN4pzhF9LoM8\njWNWiqcCc7Np7dIVkJ5bVu3ONkMRV7aqaQ5D3w1TzXrgFTP8igFA7BNJGBm4\nyGf2/c8tXBn4kDVFjTwGbulJAGvC+DjgW42wty3AqAGHx21tzRJn5diWtZDh\n/TOktr/3xbuB4ilye5ZNkc4/BFiWHKJY7DeQ/P7e5Bd6PBXt5J7jBDLmwC74\ncm0cGnsG1Oyw0S9h2ZJGLLfm/Ly7u5cK0SCV/6mXb5aXKSfyriV2xvVGmt5Z\nWMUXDc5fPR5k0MJCxM+ZejC4+Li+rpsWFSQMUHVfXHpCuo5tA8v2QpWmuZn3\ncHFMU7efnRTQWGwMAbcXm3MYkt/gaSQrkNB2nl0KCEFKCgE3PurBiWJBf57u\n/yTIZVC8mguGI4kG1kyJ1rIUXmDLS5BDfJp6LYI4xEwdgWMwPD9uJvElQJn1\nnu5Q\r\n=EN14\r\n-----END PGP SIGNATURE-----\r\n"},"gitHead":"cd0a29248dc71d8ab4e3428dcc04f534fcc48e3e","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install","test-ci":"npm run test","depcheck":"depcheck || echo \"!!! Dependency check failed, but the failure is ignored by now. This should be addressed in COMPASS-4772 !!!\"","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/index-model.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v12.22.1+x64 (darwin)","description":"MongoDB index model.","directories":{},"_nodeVersion":"12.22.1","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb":"^3.5.4","mongodb-ns":"^2.2.0","ampersand-model":"^6.0.2","mongodb-js-errors":"^0.5.0","ampersand-collection":"^1.6.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"devDependencies":{"debug":"^4.1.1","mocha":"^7.1.0","eslint":"^7.25.0","depcheck":"^1.4.0","mongodb-runner":"^4.8.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_3.1.0_1623865071717_0.19901692838077656","host":"s3://npm-registry-packages"}},"3.1.1":{"name":"mongodb-index-model","version":"3.1.1","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@3.1.1","maintainers":[{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"brookescarlett","email":"brooke.yalof@mongodb.com"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"team-compass@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"rosem","email":"michael_rose@gmx.de"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/index-model","bugs":{"url":"https://github.com/mongodb-js/index-model/issues"},"dist":{"shasum":"3ac1408353e1554f7b9cc718e027f9debdab8cde","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-3.1.1.tgz","fileCount":9,"integrity":"sha512-1Uzj75wXFw9taKaL4OBR0GLXHxmkMNiLMcBr61yeU9sir1O1L9fU54Rj03jV3lhNDSUeC+EdC/FHGQJ9PTxN3A==","signatures":[{"sig":"MEUCIC7DcpJLf5pHnIDHmCw3NEvfX77gWJULtkSPLPj0XcytAiEA1CTlCa+va7EFT74p5s1L9SjXTIUf/zcEVgzdsrJVjno=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":46429,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgzLq4CRA9TVsSAnZWagAAoqQQAJ0xhUxGEEitoKl9kIMs\n5SmdQXOcLatVtwJbAVZIa0dC7xqiJ5f0ursI1TiozaYnqtkOWlEtwHbigjiB\n3QfltjvB2Hhvm14hvnvFsXdeRXRuLMHla8tsvE1b4uZEmVTFvI2Hw9WdSBVa\n60wRwUHPYyBx32x5R/b34lh8VLg13rDHU+e31h4fsGUAECsdaH6HQOYq7n6q\nChlN0k23cKFn3sWt5f9zwHJ6E8ZAUz2y2zoxGTAVfQeoBKfHl9EJWeqWqCQE\nNb2zep+1Qsr1sdsRLp+ynKy4/CRIZBqdoYEbyCpyOtfXwDLWEpZR+5HY92yj\nXIKeVtYQ4dMjv5hkF+WSBVzsC2nMSEwFIXviN7j1XfFlYHiJT9x0Cwi390bF\ngZ5jfbMbS99a0T0gHcwGqTxARtzPqAms5gP4DIn6tpEFJ4IQptmRpiDSZZ6A\nbCubfx+GFLqapPJi59l+4B+tYACcFeqvru0jZown7COLssVHcbCJF0z2qCSn\nVCjghQvOnq6awYg+H2Ilody0Xba/ZbPxo2ZzWXC1r1dxMWF7S8SFH9ZQh1pO\naK/Knxo73NF59z3ycin1V05DBRpzH6PFWeOr9VJJDCtUGWmAbqH+OIzbImeh\nyGo1BldQ+BRHnBFbkD8e0Cd2q+4j4ROBFEA+cvro8j2RshqnaJzxQZl79m+4\njlgt\r\n=FaSm\r\n-----END PGP SIGNATURE-----\r\n"},"gitHead":"cac56f0836005f093bdc5967102e957a270d806c","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install","test-ci":"npm run test","depcheck":"depcheck","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"addaleax","email":"anna@addaleax.net"},"repository":{"url":"git+https://github.com/mongodb-js/index-model.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v12.22.1+x64 (darwin)","description":"MongoDB index model.","directories":{},"_nodeVersion":"12.22.1","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb":"4.0.0-beta.5","mongodb-ns":"^2.2.0","ampersand-model":"^6.0.2","mongodb-js-errors":"^0.5.0","ampersand-collection":"^1.6.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"devDependencies":{"debug":"^4.1.1","mocha":"^7.1.0","eslint":"^7.25.0","depcheck":"^1.4.0","mongodb-runner":"^4.8.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_3.1.1_1624029880126_0.5786566066987848","host":"s3://npm-registry-packages"}},"3.2.0":{"name":"mongodb-index-model","version":"3.2.0","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@3.2.0","maintainers":[{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"brookescarlett","email":"brooke.yalof@mongodb.com"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"team-compass@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"rosem","email":"michael_rose@gmx.de"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/index-model","bugs":{"url":"https://github.com/mongodb-js/index-model/issues"},"dist":{"shasum":"5c7963ab694497c15fa37215c0edcc6dcccf4089","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-3.2.0.tgz","fileCount":9,"integrity":"sha512-sfwZ3T5yMRI916Tk87tf3awJOIWJfhStiMoeY0QLyoMYDyacpfMxc7Y8WMwSDVipA2dCwiqCoo9KOFVtLGN6vA==","signatures":[{"sig":"MEQCIAgn5CP0MrCw+5D3JMzxvWWtQmQqFFS6J5ke0dCqLNF5AiAkHQzV31cxsPg7sXuo0JZTHvKnSCj5wpDOE8O0MQ1qQw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":46429,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg0FsBCRA9TVsSAnZWagAA/OsP/i51F1Xp+VjLsD94FB8O\nGTGc1e36nIEK5YUy4STLmtt3FhbxAtXrtNqkOrZlY8kfBiTbjUNiYifHcuji\nlgSLcwXc3N8aekUIRYsEqGd10xJG5KXMFpLtd68cbSsugLK+GQk/Qh5I7qv7\n0bcc5+KwULTPPZNINHuQVfhvaJW9DldEnwprwkttfdkxREiuPcvjGl2sllog\nT4tUuo4C5lQEAYqtp/3ssJ39Lo9mQ4LTZ75Bm14utUwlA0mt16rPa5dGdMb+\n57GwTW+7o4z9T1P/8ZEEGPpdrHCRcF4XuEpHfUeoxaTgXctwLa4jFPeI2bHJ\nLyM91DzlCiKTEBwI2UQHxHsYWqIEZX0IEN7YSEALR6nOO+jKnSbRsTdJARHV\n2phVhjsKoI4RV16KUyhHw2C1sxedz5JEewXnNfrBtaEAhyk0t2OG0VnLpvnU\nW/eypI+awwDwyrwp46o8TkX3ztX+N3YnhaKnxOQilSDGHeSEWbE/dvC+SzK9\nXxIN9wH//C0qXBXwTocGjNhusmZiQxLPHlDPZky8v62YU58IT1nhE+ZYgHtt\nMPwYJiN6DTkxk9Ez4+p+9ubKjGuj/nLZGw2d9K4zBf9VVAk9Glhsmb4rxuDe\nkkcj9DjnwKz52NmKUs1pEXeCse2mOhHayXx9fyEctrFDD2umHzJJ2C4DVoNb\nzsoT\r\n=k8C5\r\n-----END PGP SIGNATURE-----\r\n"},"gitHead":"558b869fdc5c6c9cd59229974f214e1a40158413","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install","test-ci":"npm run test","depcheck":"depcheck","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/index-model.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v12.22.1+x64 (darwin)","description":"MongoDB index model.","directories":{},"_nodeVersion":"12.22.1","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb":"4.0.0-beta.5","mongodb-ns":"^2.2.0","ampersand-model":"^6.0.2","mongodb-js-errors":"^0.5.0","ampersand-collection":"^1.6.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"devDependencies":{"debug":"^4.1.1","mocha":"^7.1.0","eslint":"^7.25.0","depcheck":"^1.4.0","mongodb-runner":"^4.8.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_3.2.0_1624267521046_0.9934975751789621","host":"s3://npm-registry-packages"}},"3.3.0":{"name":"mongodb-index-model","version":"3.3.0","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@3.3.0","maintainers":[{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"brookescarlett","email":"brooke.yalof@mongodb.com"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"team-compass@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"rosem","email":"michael_rose@gmx.de"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/index-model","bugs":{"url":"https://github.com/mongodb-js/index-model/issues"},"dist":{"shasum":"6a83461cfb2f57523ecb45c186581c9cf06cbfd1","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-3.3.0.tgz","fileCount":9,"integrity":"sha512-VoOJzFJQR7wIqd2qlZvPgE1T6Euxp479EriY8ypLLtRa12VDqhYbAn+MLft9SqQb1AfpnXe76UEVnLcBqjBGTw==","signatures":[{"sig":"MEUCIQCC/I7ZNkaOAA0YCmmyqUqiEUG5RHK7v+7xBB2rpIgGXwIgQrhM0iHxM/EyYkhFVxVPAuHOkstAmz8GMF3uUQS6HyI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":46518,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg3Wq2CRA9TVsSAnZWagAAxbYP/iEqYdxTclQg+Y7pbmVm\n9fmbpMmHEu/dpR7oW3cbmDOZA23LUe63ETalMoi99u6a8QxKbRg41TuI9Fmu\nUP2xv0VLU8NjbhinnV2Fp6L40wvW2gu4sUX/RCNzX56Jm7QWXk+KSBrb6vFz\nsQnBZuonz/hc7tLxBDhtUD8D2UYUAlXCzSMLnh2vnRcg4q7MlCBljOpsXdJO\nTX+OPfyJYQ8X0ok0KIXOglRYEBuGjX1und32jl+1v1EkuawGrvRL929dW74o\n3a/KAxLpuK5OCNRuMHezKT1AK3HO3FAQQTme4dKQvqtEmO51AaFE5DjpWLAy\nWfCw8706wwweG9s/fSGCKLDWMlBiGEuE+WXKEultByD13iO2UN8kwLcocpXN\nk4qYJpR3Pbk0431n6ralY7JxktLPUn9yiWk5xLgeUdgvAxAY7hb8U7/9b5iN\nUjiHR6ZM5e5X/YPuwUxXNWbIsHFnN47EnwIz0wAPjgr3epZ57V14HO9JMzo0\nPkK7izHtCpPIj/kDPeSSkGRxPMMzEbDcBepJTbUpJ0Zs+xWwrJequ3pwmn9H\n5PCZZsi2RyD8SRhY2G9jYlPUXeNaDiYEofO2qnBAwNi036GwCu4mnOX+WCpi\n4wnbyXVpVqx4+i12ajKE4VRSdAbe7WO6fLwA11jmGaAp76nML/sN1pgy9/rJ\nL5fn\r\n=yW2c\r\n-----END PGP SIGNATURE-----\r\n"},"gitHead":"2cedde9f5ef67a85c2f21bd6c48be8f4a41bafd5","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/index-model.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v12.22.1+x64 (darwin)","description":"MongoDB index model.","directories":{},"_nodeVersion":"12.22.1","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb":"4.0.0-beta.5","mongodb-ns":"^2.2.0","ampersand-model":"^6.0.2","mongodb-js-errors":"^0.5.0","ampersand-collection":"^1.6.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"devDependencies":{"debug":"^4.1.1","mocha":"^7.1.0","eslint":"^7.25.0","depcheck":"^1.4.0","mongodb-runner":"^4.8.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_3.3.0_1625123509712_0.625606012207407","host":"s3://npm-registry-packages"}},"3.3.1":{"name":"mongodb-index-model","version":"3.3.1","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@3.3.1","maintainers":[{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"brookescarlett","email":"brooke.yalof@mongodb.com"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"team-compass@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"rosem","email":"michael_rose@gmx.de"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/index-model","bugs":{"url":"https://github.com/mongodb-js/index-model/issues"},"dist":{"shasum":"51f470266a8a9d69e5baf8b9cbe6cd53de1b99dd","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-3.3.1.tgz","fileCount":9,"integrity":"sha512-rpJyVJL44PrQ+5EjQk2ARPRipA/EyjnT+toHhV5o2eEd08WRiVW9Y9qt6MSqA/9XBWTIzpvTH8ZGqwiw65yQeQ==","signatures":[{"sig":"MEYCIQDn4k5Nen9IfoQQBfAfD+M21i+fBIoUKJpDxBnLwKv79AIhALwQb8u/hoh4LJYMOqLAh2jKWXYdv4XyVo8lfQsocSTP","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":46575,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg6JFLCRA9TVsSAnZWagAAhLsP/RGk3zoc8nzc4CohCse+\nRLNLi8s2prLQQdok+lFO74rPZiI2a6BWhMmmjNjKOOnfmUY2lTUrQrvP6VdP\nnzQZU8bizUDE5QN839JcNpOIH6ZxGo7vauquQxbs3MQdrDiR/9/H8AwRVWir\nkWNNlFtsbW7CchLz7L98t9efDM2DY56d5C0C6GAELmaPx3aa5yBCv48dY9lH\npsx3bP+tMk2qKqZQFDgb5bYyfDdz0EBRzlbSI+SrZbVWcpvX9dDadQncJz5Q\nWFKX440489DjXDFKroYpVdl9lZuNtm7j5yv9yEOkz/QGI8m0G879ToejexIy\nrO7OY5RO8eELwPueSqRJ4xGcgQjgB7sg1YQuNTrNZTOVH00ghQk+ThzS7zm4\n5rgRz77a5NPQWWBncWtvMw2vWYOKMtkG8iDAIIqHpQ4MxCVfIXv1RlElEHVr\nVsmuy1Ia84XflNBE4mSKM6i4eQ7sIvGv3wJkzpkUWI8tehcl/BSxXxFpJpyt\nrqB8L8Y/t5LXOJXk5k067gVD7KUARITfnzA+yNlYlhVl/iLxulroFOm4Wo98\nt2IyhQiMSBH5muotE9VEPPZ1KFdPe+VAAFpCBQBrH8Thnj9jHJzB1ge0PTw4\nrZ2uC8Sub33fxpco/Wd5r+toeMuT85v3F1evx7ecDLDstNNlGIQugCvpoRHe\nAana\r\n=74jV\r\n-----END PGP SIGNATURE-----\r\n"},"gitHead":"4200b0aaf1f6be5d883315b1090b899c79b1686c","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/index-model.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v12.18.4+x64 (darwin)","description":"MongoDB index model.","directories":{},"_nodeVersion":"12.18.4","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.2.0","ampersand-model":"^6.0.2","mongodb-js-errors":"^0.5.0","ampersand-collection":"^1.6.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"devDependencies":{"debug":"^4.1.1","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"github:addaleax/node-mongodb-native#71d4c39e5c858f49d10e840df626eca4da653e28","depcheck":"^1.4.0","mongodb-runner":"^4.8.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_3.3.1_1625854283313_0.9236054443258586","host":"s3://npm-registry-packages"}},"3.3.2":{"name":"mongodb-index-model","version":"3.3.2","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@3.3.2","maintainers":[{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"brookescarlett","email":"brooke.yalof@mongodb.com"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"team-compass@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"rosem","email":"michael_rose@gmx.de"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"cb6b82f1638f4fd8b8d446e501a2a843e02291b9","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-3.3.2.tgz","fileCount":9,"integrity":"sha512-0/dxalooEGpDe1AUx0sra1hfyQ0T0/gRlChiUMANcLGxcx8+vmC+4VIu1YszbfOa5benIoRIu1TtakFYdLQH3g==","signatures":[{"sig":"MEUCIQDovuWMFhlMAWjj6ry8cYenYkyc6OvK3ZZK2OC+5rE85QIgWt2dihNtF0i/orm4BaWBrrU13LkUz2KZp3Q/2uTsfq4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":46561,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhC9JbCRA9TVsSAnZWagAA2gQP/1iQIc2YqCFuwkCiyfeO\nk0M4sK1aAV2Gxa4fMsJGUsA0VsNV4hRc40LhVeyHrVMy60MX5/0ceTdxsrZv\nk2TyEITrCBxumTHYnqEr2R4BrO86VwkBYoLyceNYXXJ7O14JrYEKEAEzjFwf\n4wN+wdu+Njr+YBfVMvBzfL3JnxlJTQlHVbNtX9d8lNPGVnMl3Qmx46Ivs+rw\njHFrJhMnBf7zHLnQuaUPWUt5sADS2s8nrzFFKoZFyKltoW5ZS2ge6RJTeOMT\n5DM56TEd0s+wFcUwKo/5N4I0riKjQOUb+TbRr6JZ2DRpQ5AWg2DGSwTtcpgx\nkUB4NBtZwCnkoHbzhhi9MgUNeQr8NlouRfne8vJgjKMgmIwetHblbSnIgyNo\n07rCVOo9UhtG1WVDSD+zDzCf18DtZI+IAgYMW5Up+5opvL+GEwewztiOEBwH\niBGeqvIGNRg8G8N3PuCE/xlHDPccMT/tvj9G9+ZKcZViSq2HAEj+PyicvYEe\n0lMwsnDMmnQdDBIY5MsxHVoOoczSP4eVSkymlbGyMJqMbrfyq55D0z02BMu0\ng8Wf7EHDv8gqCLBZWJhM+DGhemmytCNG+zWmVJXBxO1Zl9zo5cbpNQXqKdA5\nDHryVSzYBG0uU2hzQV8hhwSASGRaEt/bI3IBSfsmvDQoj5vIWiYIVZkr8aF4\npugF\r\n=ELdV\r\n-----END PGP SIGNATURE-----\r\n"},"gitHead":"8ec19acfe461d3f9c3e6eddc550669aefc029180","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"addaleax","email":"anna@addaleax.net"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v12.22.1+x64 (darwin)","description":"MongoDB index model.","directories":{},"_nodeVersion":"12.22.1","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.2.0","ampersand-model":"^6.0.2","mongodb-js-errors":"^0.5.0","ampersand-collection":"^1.6.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"devDependencies":{"debug":"^4.1.1","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.1.0","depcheck":"^1.4.0","mongodb-runner":"^4.8.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_3.3.2_1628164699572_0.5395249339188937","host":"s3://npm-registry-packages"}},"3.4.0":{"name":"mongodb-index-model","version":"3.4.0","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@3.4.0","maintainers":[{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"brookescarlett","email":"brooke.yalof@mongodb.com"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"team-compass@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"rosem","email":"michael_rose@gmx.de"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"05c3050233c7a26ae1224b6c104eb902be1708fd","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-3.4.0.tgz","fileCount":9,"integrity":"sha512-SVH4qXxpRV1QHlh2Xu9bf45cKMBY/EgUX35ZgpsPaKfoQHm7S1F0zenvXmQQdwaqv8XueZzldbLas+M9MGxNDA==","signatures":[{"sig":"MEYCIQCcEOtFRgy1mQ9A4Ii5S3Ccjfg+ETcFn75YxS6b5/R35gIhALLy66AerRX945QOTB5bmNWNruDqoS7MeTFpJfoBWt5m","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":46561,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhE7aBCRA9TVsSAnZWagAAyD0P/2c4rbNSuzrJ7lxbvuKn\nLcyUTLPzKAR+93Wv6X367Zkcqj/0Z/MXBtcExvJ6joKRhg1fIIPUYqQxV0vH\nUl5JoqyIVWgUyAET2HDNXYqXTzxpCUjVIBr7q2A+LD/xloHoRuUF911wUgXP\ntNWgjGmthw+wNWKURWwtUvRosDmm2LRpTY1Nf3BGiTeMQmByLFY58llFNFex\n71NDTacZ34l728UmYYarZ6sF01q8L57KBEqyZVvPrN61WJYnVDiCQ5W02To0\nP854O9oaxdbY/Dd7myu1MNUKEqJDPU5b7LnJM94FDSXiWjhahFVJQntdsFdM\nwzxZ8hUJDvKdapoEwkgPMSwP+WRbdFBxQnXkGRzRqgRMSlsK0TN4h8xL6GW5\nv+TQCdftijZLdYPttuna3pIjLmDm92QY9LU8vSgzjT25+mIQ0OENNJVn3Rid\nYZGtNfJ9D7aaX2+J9LJjr8rtf+gBfBrneVT6WISIWsVM9q7L5D0gzYy92gAT\nvKzQjhZ6RzLmqm+YKE4hdFo1Rt/EGYSdGRXBxUq1k6+2vxuNRiaPkT0Sa6BD\ngKBKGSzBC6mC0UOqqktA0rXNbH7gp0lm+0dqijrmG2VZ4MYWI43GLFWXMqH4\n7wGNG/6YhXOOcRkV/vxTJHRTifOEM4fELHnoFFXFkOY132rsFaGqYg5zTGpI\nu+l7\r\n=nCoj\r\n-----END PGP SIGNATURE-----\r\n"},"gitHead":"e00da432655fbd1b723fd693527bf481f4c1e645","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v12.22.1+x64 (darwin)","description":"MongoDB index model.","directories":{},"_nodeVersion":"12.22.1","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.2.0","ampersand-model":"^6.0.2","mongodb-js-errors":"^0.5.0","ampersand-collection":"^1.6.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"devDependencies":{"debug":"^4.1.1","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.1.0","depcheck":"^1.4.1","mongodb-runner":"^4.8.1","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_3.4.0_1628681857464_0.6981123611944562","host":"s3://npm-registry-packages"}},"3.5.0":{"name":"mongodb-index-model","version":"3.5.0","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@3.5.0","maintainers":[{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"brookescarlett","email":"brooke.yalof@mongodb.com"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"team-compass@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"rosem","email":"michael_rose@gmx.de"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"79a7bb1b393c283a1290459dafd66d122726d9d3","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-3.5.0.tgz","fileCount":9,"integrity":"sha512-5JAhqU/JsrrcfSFJVNDcdVus3sNBJJCvtuj+AxfFO7xjFes2BzRhLiONWCj3NZLhLoltmyFdRb2cwRd+zASnvw==","signatures":[{"sig":"MEQCIBk7Lwx4HDrsVUJmdTxzHQikyfpFAXiVg9Tu7OyqldHqAiAgR26iEPnAnoylZAefCCHLGKV5cpL+CfumSdQFmTctBw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":46561,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhJQ5+CRA9TVsSAnZWagAAXcEP/3I1p8Fc433KQ+XClj71\nicMrZCib1zsZks2uVwycoSTQE3wcYnhiZ65Wrif4B3t0AOU7MGbHRr1fkcuN\naZWS4Z2EH1axmJMbyfhhC6hDg7gMW3r9Uae8YIclwoFb2Qg7kzVvJijkF2n9\njLqP0kGQuC2MBuJaA1O8hJkU8FS0LT+ZP+/nkyqYt+9ni9BMMjI276UB0y2I\n2nySEHbiyO9h7Ckn2Mf6O1IwvYkqSHnddLBWiG8MniFPBFem+LaVToWR0gIf\nNMrLL8GNeXUx9qt/oPBMDx1xfXyq719xMjcYNsGCwaHD/XwmS+HTM5BBr85e\nvsqReJ7Q95Hepy5Cq0AmQFS1aKr5HUpGHjNAe6nByIY/zMsiBgZ99w6v8LUJ\nzFZTg0ucavqixOcI1tg/jKRR/mt/CZxUu1Y2pIX1vIiMx23nm/bP43yz8C0A\nLcjGC9HPMwixBfhb9hBnJj10CBiE5qtkw9hZ2VWyRGurMLT8RHJQXEnXiqDt\nyyqy2Fo/IHbccHjSFshaLjU5bbAgCifYMUwqO77R8e7RW8AaWrkBvv0LsJb1\n9NCj+IMSxV3WiNNdTl4MGE6ivEEWLidxk+7cJiuz2LMa1i7DjHwhoZgb6r85\nwZ9XVMGGBWeeYNaTSZh5sHI3sql6FEomE+A1TAehmUrSwTKSNMImxX2QssPH\n1bJf\r\n=Pgo+\r\n-----END PGP SIGNATURE-----\r\n"},"gitHead":"abc524ccbba843235e4ca5ee12d5553cfe65388c","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v12.22.1+x64 (darwin)","description":"MongoDB index model.","directories":{},"_nodeVersion":"12.22.1","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.2.0","ampersand-model":"^6.0.2","mongodb-js-errors":"^0.5.0","ampersand-collection":"^1.6.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"devDependencies":{"debug":"^4.1.1","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.1.0","depcheck":"^1.4.1","mongodb-runner":"^4.8.3","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_3.5.0_1629818494279_0.7065626593900611","host":"s3://npm-registry-packages"}},"3.6.0":{"name":"mongodb-index-model","version":"3.6.0","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@3.6.0","maintainers":[{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"brookescarlett","email":"brooke.yalof@mongodb.com"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"team-compass@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"rosem","email":"michael_rose@gmx.de"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"056982bb52e396d16b2e5b0d43ca3427186f10d6","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-3.6.0.tgz","fileCount":9,"integrity":"sha512-tOx0joqNPOKN9mEsSOk2hUQ018uflL/gD5oqCF6LhwQMx7hVG3o3VBGZRTLpObEICH1KqoNW9wmU+P2PLj4xvQ==","signatures":[{"sig":"MEQCIFd7yIUFx3gYQdpo7WdFdrS05VI6qvO36n3qWd0DYM1kAiA+Aq+BjpibW5Dv06V/IoK3a+k1lOz81mb8dZyG9qDpYA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":46659,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhl4XJCRA9TVsSAnZWagAADUYP/Rtso3A1sZ48qRju33q9\nlc7DagIl6xFcXnhXB42eVj3FyArtwWPhvy7Z3TvdsX6z+icsp4YK7hGr+Glo\n5/xX1S4Wv7lbNfQePJ4RpjtFt5pbgrdDx2e43cxkKuHL67f9Jh8E08E9U+Zi\nHvmQie7DjNbjb/5S2PcqORrCbyeUslioXz8i5CrtF7GdCxiRNC8vG/MxU29s\nixHO1H11V1nRkuxYl/bE8W6LWR4WvwHuiwb+vz8APpQTI0atCAHtoSkgieL6\nmSlLDtxXjXh/700sn0BEvntx4WXzL2aJjf8csu79cvUzygJFmxapK2BCDHuo\nDfSmkji1AJoITIAGWquVYvmZBw6Cl8eSICZFFMHn108lcBbgPaVCJF62544x\nMFIycoo5xNHrd0bwwHzfAzaLHGnQivEe/XME1OSchrWA5GQar7FPCidJhT1i\nyp+1bfNC9t9RGOCOgoMguZs6Wqgk48j9k+44QVrbfv7Ey+yNxEZkcWrFCWuN\nMdd40uFjfXtRcrxIXOa2+bxuGUb+yrpUroRB1li6GiM7l4MZvPOczsBR7TYc\nTbmsvPZiP1X3HVFXvJt7g9dQXXlRxfp9bNf2EkUlM62C+bHuEJqbXnBCujSp\nRT+U7rMaoINWzxfhWsRqxXJIsW7j0ilFo0TIJmB6fgQfVH2WtRZkYV10gnXd\nThqe\r\n=+GrK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","exports":{"require":"./index.js","webpack":"./index.js"},"gitHead":"8ef2cccaaab6d84a5fcd633ea8dfc4c7a4db551f","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.17.6+x64 (darwin)","description":"MongoDB index model.","directories":{},"_nodeVersion":"14.17.6","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.2.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"devDependencies":{"debug":"4.3.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.1.0","depcheck":"^1.4.1","mongodb-runner":"^4.8.3","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_3.6.0_1637320137431_0.00834086620501262","host":"s3://npm-registry-packages"}},"3.7.0":{"name":"mongodb-index-model","version":"3.7.0","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@3.7.0","maintainers":[{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"brookescarlett","email":"brooke.yalof@mongodb.com"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"team-compass@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"rosem","email":"michael_rose@gmx.de"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"7bc105292652387c6d26e79ffac974059cb6d178","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-3.7.0.tgz","fileCount":9,"integrity":"sha512-ev/bzTlP9cs4F/MvWbVWxL3G7UZtAj9h2GrvI7qwCfglyBR2qOlmat9c57f2SAcbKQZVS0y9wbKvZurG/IAQFQ==","signatures":[{"sig":"MEUCIQDMmJDQaNdAC5qxY1X/il5sbORHQRAimAT+2nBquk6y1AIgH8nNb6idJHs6Li/I7Zj3CBx9FubC9NYrmp3UXvLzmwg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":46659,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhweE+CRA9TVsSAnZWagAAC8sP/0sLpkIc6ybPyVz3LpDR\npPVaPkuiCkzbI1P0YF6beXzBPaQMNzqF+uQOOUJUSGj4fXyTbUU83Wv5ThvE\ndoCEsc6QDsBZoOmRbk0yf1IYPFcFwf3rxFoP+CB6fFwkpecMJuiPXf3yAkNi\n913c7nAg/u524H8yeDqHqKGwbQgdpIA5wrFysvcWHsfYTK1BLER7XfX3uBoq\nYuL2zA2S5auhHIcOviFf/FoQHxITYe4UAUR7WFjZQrutVWJEBJZTz9dc+Soy\nRyDSjFRMyc3S7ybCEv1cYn/Qb2hozUOEJNP31pPK3nFGEi2Kz3GY4LwHgr/y\nowthbifVsaQaFDSr9FRW+hYhz3lUjp8LC6fmm/g1QioescZjtrjNgIFr1I5d\n4UVelxDLGZvRiKMqaw+kVssP4/DXRyZT7zheyyb/Hwdeh+OfLkNt2ubLMBn1\nV0lD6+j+npaLcClBmKGJfwVJmxqOR2oIpFzeBn82KTMKpmlnPd7L6Srdy+u0\nostuvREiq3GsTrYtp4097ymbpbOxwKsj1c2Ya6Up7WSTwdX4VyIToQ6po+ob\nNqxKi49nyPjsqs/jnNJ9+s1jYU5/35C7HHzgJ5SVMCXOdgphatmkKuM4JjCe\n4BFVCbTgyg+WvD/6XL3wp/YdYFRHzWiOT8voNlEpeNVnmQM6nykZtwuTmy39\nyowu\r\n=yzTH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","exports":{"require":"./index.js","webpack":"./index.js"},"gitHead":"77166e3754e36e95c7ff7efb5a0ce5e0990b0ff7","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"alena.khineika","email":"alena.khineika@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.17.5+x64 (darwin)","description":"MongoDB index model.","directories":{},"_nodeVersion":"14.17.5","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.2.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"devDependencies":{"debug":"4.3.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.2.2","depcheck":"^1.4.1","mongodb-runner":"^4.8.3","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_3.7.0_1640096062564_0.563521805826777","host":"s3://npm-registry-packages"}},"3.8.0":{"name":"mongodb-index-model","version":"3.8.0","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@3.8.0","maintainers":[{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"team-compass@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"rosem","email":"michael_rose@gmx.de"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"e23567d4775b72991dd86234c8861d97a739ab87","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-3.8.0.tgz","fileCount":9,"integrity":"sha512-w+El4vrqRFukLza5WidcsQ5sxW8l97Vqs2dSxXZQXfIRTO/CC1Ajtpw7Rzhne+I4gTERU7osUjGUHTAJRGUNQA==","signatures":[{"sig":"MEUCIGkT7JISfYP+FPICZ1nTEB/JKeRC5KxjkZsDZ4/PrPccAiEAiYiRW2xzBgYekT4mPT1CW8BYRaOHypuARiN9TppqILA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":46659,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh+9nNCRA9TVsSAnZWagAA3PQQAJQq+N4AsT8ZVIyz++Ew\nIyxWUpETpUUklP5eZkINd/ew8kLc/8qB16xhPQwoIrSluT/VIJLvbdULDeiT\nsUl1QNIiuy98JYi7s6bepX9aQdEsDAySGUCW+WIXLtImBF+3Y3OFQm+fOzvX\nm/cB5U4PIOl4GRnNvHDrb2zyiTPaQNypcvFab9dI7VI7yEjUaNQCHpz5E5F6\nFi1fCOyt7QNZ2mJukOuh7q9TO/2IyiDRuES7/BhMBSnNd4Y9sPWLanKjryT3\ngfigYUeDmX2wlKUOPW42arsbIR+oZyldVX7qX2Vxg+iKvupLmb/8YwOYP28H\nFs1aox8LlhwTnPOr/snuYxB1FJGhxQ14g0W20NACRBkblDmAwA2nPvpp0FOL\n11JyRZQmuhs0h+4qDOFwbI3bV7BDUEq2bgevNdSA1PyzN0Pxf4nvxrc+SZJu\nSN8EOjn9Cnivkf8Ebel03jz25p+/r/zrbFweLchToEvrrPgWpW072ZPW+SLG\nPKzGeU+8/kUMffhCLttQYPVOp6G6Lt9EpnVLhMTlpq0D4uJgteZqr9GFfbZm\nfcM4sUilZm/Fo1wZa/52fy/FSY1suDxPhju1eK9FsgGuC64uy+NHOaWwkmyO\nTsts1TDFvmJiuH0KqBwIIt11P0WTYKFlUdnRlGYLXy8H69Righ+/6wsPTsRh\nBXL7\r\n=+RPf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","exports":{"require":"./index.js","webpack":"./index.js"},"gitHead":"6563679c816fa44691a53b7e27fa0cb5539e0854","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"alena.khineika","email":"alena.khineika@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.17.5+x64 (darwin)","description":"MongoDB index model.","directories":{},"_nodeVersion":"14.17.5","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.3.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"devDependencies":{"debug":"4.3.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.3.0","depcheck":"^1.4.1","mongodb-runner":"^4.8.3","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_3.8.0_1643895245703_0.8787619729043157","host":"s3://npm-registry-packages"}},"3.8.1":{"name":"mongodb-index-model","version":"3.8.1","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@3.8.1","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"team-compass@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"761e6ac17ee06006ae99f9171d884c21f67377f5","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-3.8.1.tgz","fileCount":9,"integrity":"sha512-xY4J5kwjAmhZx85k60NGfgtfzdD2Ji09CrOJ14kzBRiqA6AgJak0Ph4Jv/HB9x3rPi/xK4jJ8RL1gdQTbbQ9IQ==","signatures":[{"sig":"MEYCIQD0+zLF1v8SMo2sJUwA+fBQ3QKtFG1y7iMrJDjS7CCtygIhALyDsvdIN30mVtKUE2C8RJAWGKcCxD3A9TI4+zS9FacW","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":46659,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiGNRGACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpYUg//eNvDxgvsoGZt2vjpofaXqt0hTD46n3eLepCSAKRs2pwZuHVE\r\nKlYb1qvtnQNJ1hA9ySMKdDADzHaavnqilw9o2IF134AbhDG0zlrZiPp2IXO7\r\nstzBbBrz2Nll3PoaRb7SERwgwmVIhK3m4AvbuiimdjVLOKZxm91IoZZSID/q\r\nQbxWLs5H4Q6J/wQc7J3Qef4o9dhL1BiUAsisA1yqfg6uTbIRwt2ohS7QOr03\r\ntyHfk9jrUmjVmDWzhJuMqYQ3IuD3EpofMSCSrcdjEakP2ArnqYzZoi+iZUVY\r\nRGkvRPDaemlbgazTmKsPchiEoRBUUjKR1D/HU3d+Alm21JVgWaxJIL8e/2a6\r\nea235x8hvcfL6DGDgTcxWfpElORRsssTNbj/ovRdISHBOFo8bVfUqfwTDAjr\r\nxmHijBeQwpl4i9/xrQghag1Jnp1m1aFd272Ay6LWshI+6aoJVd/+GXYwXsnP\r\nR2U+PcFWCCIGdwftdAORHzcis65m7ecfnVt6ZZtip04XJI3eiuBabsxA06Xj\r\nZEdyQ8xdbxsHSGB8Py3eX+aI7jAasCHIX3tVeoxiFe1qEICuPvvDF/HoJome\r\nYyraaBI5grXrBY59v+KIG6DudJ0LrJE/2S4DPeyS1M4Zcv5oIxD7oiyLpkh+\r\nGJknSBc9cywOvD6A7V6+r9MwXva0GfKqm3c=\r\n=CnHk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","exports":{"require":"./index.js","webpack":"./index.js"},"gitHead":"82309afe6b0af6509e295de55a5d3170b7ed205c","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mabaasit","email":"baasit121@yahoo.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.18.0+x64 (darwin)","description":"MongoDB index model.","directories":{},"_nodeVersion":"14.18.0","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.3.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"devDependencies":{"debug":"4.3.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.4.0","depcheck":"^1.4.1","mongodb-runner":"^4.8.3","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_3.8.1_1645794374867_0.7966353166680542","host":"s3://npm-registry-packages"}},"3.9.0":{"name":"mongodb-index-model","version":"3.9.0","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@3.9.0","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"team-compass@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"e51905604674bd0bcb45e66cb43c27973facf1ff","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-3.9.0.tgz","fileCount":9,"integrity":"sha512-gPwbEH1nPEU8KLS+A7rm1yCOs+2F5KAP7EPekIZv3HOfFij6dXljwQtXWvzOlYytke4nhDu25K8VUnL1v0pjaw==","signatures":[{"sig":"MEUCIQDHEdDwcMGqC3yX21U6c1Kp/mADQqIGLZgwncKm5V2jpwIgB/pPDy5jlIkBZTkfWsJf8RRZmyDT6i0aoSU6Yd1/Yq8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":46659,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiGOMaACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrNKhAAkwYjzSuVjlIPy9piduAaGQyetIpdT3obS5WGh4VhS5WxBG2Z\r\n69dhTMZSx5wnxjUDYbi7juLFHBNQVVR6BRXbRs5I7+qgfO/SkZ7vB+YqsxNy\r\nIUf2dXZnjrGeJKxDHH/fw0lNKfV9ywKU4erCOW1YvWfydSsqWe00H0KYp+vv\r\nET+170LGArYiCcyZhMM8ivg9BQnyzYZJPj2VcTawP2KQ8+mtz2A1GSJz1Fzc\r\nJbNYV8EcyzmroBZqD1Q/X1XKoAE4m7FcMSdXdJoRo0WiXZzIM4U0tjd0meso\r\nxflL1+jwMJtJhTa4NjdNTi9fH5BDI8bOWchrcnJWwjytbB6n7p6CQyHy3pcK\r\nwyp7ksdm/N4rPfXcWQLg5sgUVBzIb2nCj2heRCsad80c3cRYkmHoRjdajQ8L\r\nh1Qvfo6McuzTlAZ780GfHc4wAGy4XFmG7rMeSpExxOW2tAYwVsubnrhd3nye\r\nBwYXxaCjroPI1+rSuHD0s1kc/WYscI4srv8szJ467xxW76m08WG7RkF/yOxh\r\nNDrck32B0zsX034jY2F0lJShVIMmeGXt10d9aJHCtzBy1IqanJXGe2YkDh/Q\r\nUA8SiwNPBxWjIesSoeYDCRG2mLDDr2kEkiIj9YToYkPQ+F79eNJ6wIgH9z9d\r\nLfo/Ngk8dGgBu/qomo18QMCPqViHZoSxSwk=\r\n=ESfl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","exports":{"require":"./index.js","webpack":"./index.js"},"gitHead":"2bb63cdb1d4e825f280c0d2af14b7298c5769490","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mabaasit","email":"baasit121@yahoo.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.18.0+x64 (darwin)","description":"MongoDB index model.","directories":{},"_nodeVersion":"14.18.0","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.3.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"devDependencies":{"debug":"4.3.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.4.0","depcheck":"^1.4.1","mongodb-runner":"^4.8.3","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_3.9.0_1645798170217_0.5056964575343688","host":"s3://npm-registry-packages"}},"3.10.0":{"name":"mongodb-index-model","version":"3.10.0","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@3.10.0","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"team-compass@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"d2127495dff0e8b81365a062a54fa4101f44b9c8","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-3.10.0.tgz","fileCount":9,"integrity":"sha512-lsrWVrqfSXbwjbSuMF5epD9RLBKJVW9npc5L8sJXC0GGM5QXkjqw9SxFq6uxCDJLzIYHLwY0PlAozdSv48eZIA==","signatures":[{"sig":"MEQCIET8tCbvO6FSCk+ijtsPjx2KCetj9FoH4HPCAB8WxbS7AiBgOSwKJsllIhHqPJCAB1p0Yl3GPHqWyABML+0wgSqtDw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":46813,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiaW+wACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp9MQ//VVVhRTT+6I+Ktz1brasJ+tb7975rLKL8GK0NrOxk5d6Jd28/\r\nYTzFS7PbRUkahYppxvzTuVN/zE3q+PfcYjNZkgjJM7hdrtN3hnm3mwOcKBr2\r\nviNhG+cdlwZCQDSy0PnhXniOkydd7y/lsdVfIh2zwtPqPe7sSL9QeN8ZPAuC\r\nJQw68qF7gwvJsBny21CG65xWOxX89FrLfyAcLKgFc1U7SIkBVoZLYW4vlaw4\r\nDcpTK4PY+3UM5PQiUwzC55xntJ5rfeq4mKHXUczzi3vzHJw7FkFiRhjUI7vf\r\nRcmcPQHQhFbRugaPnrXoZbD+CKSmOamShi0UrzhcMn9RQB5k4RtvOey2CFSj\r\nuAz0LuKM+3w3EJ/rHai/xqz6luh5fqpVkfgERMM8saSQiiIjydy7LrvfE9S5\r\nt3AWBeqwHzwGOq1Mpc8UfC5X5M4Tu4w0CxEUAivocL8EwgqfnPgaLZbHDJJT\r\ngcMO30+9gJWsYt/bkTvvHX/qwCh8SaD5T4x5PPPeP3ztLUyHtK8HeGTFiY3y\r\njk7oy0TzYDN4Mp8WTIs3HGKrQqoehVqW4gmx9U9S4v6mrQhbUfRbB1VCjIe+\r\nap8yv0aqzuLXwQkYEzfqPrScv89MKt7fB9u5fCpooZna80+p8vgvmnqPtHR/\r\nUQQpdf2iekXofa6H/Dqhzbq6id2aQ7BKYMs=\r\n=zh+I\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"2c4149184e87b8340851590663287b914d7ee63e","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.18.3+x64 (darwin)","description":"MongoDB index model.","directories":{},"_nodeVersion":"14.18.3","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"devDependencies":{"debug":"4.3.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.4.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_3.10.0_1651077040628_0.6073127007329151","host":"s3://npm-registry-packages"}},"3.11.0":{"name":"mongodb-index-model","version":"3.11.0","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@3.11.0","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"team-compass@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"336a4d0c67341a436cec1d4939483134f26f24b3","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-3.11.0.tgz","fileCount":9,"integrity":"sha512-hV4VfDND9QkE+D6+whKz7IrnmOX2K05iw7DMJwCMt5XJRoJQwOTxkMbudaKtXdCEzffXtED71a9kYVcl4j8x6Q==","signatures":[{"sig":"MEQCICdoeGFEgJqRqlMPwI5fRHCEEIs7stwf8HuRKkCQaMdTAiAqASizOitoKi1S6g8yky9uAXsiS7cEyzXkbQhlQVgDxQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47092,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJifM24ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpUlBAAgt58BKwiMy3ltHNFF7lh5PfBs5kvj3ZIosBrz9f0TayqoX84\r\nOe3q7/4Wq3QZBkjmyGgoRb/Xj1jwq3jt6M8/gCKzfYWVaqWh2xDK7/XmT8K6\r\ni3eGsUK/RvHbt3Ann4h5s1FxEzM+HJ1dYuMjVn4l+fOLMWm1IZXnTZOio3/R\r\nLdPy0EwmvLNcm6F0Qpjt4S8PqbU1p96l8yL6fFYPqtZNZsLdq3IjhP6xr19d\r\n3sXxecpQIF2YCWOSXbm/qDOwh0ZwYDx/AhnXilxddwKN3oDpqBSLzSundRVI\r\nGfHdLmml880Qp6cjkBrCUouOdh/sJYZcavLs0F1U9/qbH0OznWPIMemNiElj\r\nzbICuJ4PbVE+8k9/wd62kkxoh3mtFV+74c4tBAUzIkIdblK70NMjDWQjojwb\r\ne7hOfGSwFXFsuUgq27xq6Bn90n0b/n00AC/A2NHjBrbPEvAJu6Q6xUNmodQ5\r\nPjmvG/h88IfFPCGLLJnEYW3XVORswGF9xLFickHMctM43l3vd3egtDrp83LB\r\njSqIx0q5sKU5PE+srf67+O5wobZ1e4DPTCW8rBnP6r/aHynUNCsKQh/F860j\r\njjHHTkES0tBEFAuJf3yzUUEcssvPnAnxyuz3ACm8pc1zRMmt7A0y0oxCO0Pe\r\na2E3Iq8uvUMSup2Jbyj3Kqe/fnG2VDgkh54=\r\n=G8Yb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"63c32b940f523e4c3e45b86a5aecaeadef93253f","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.18.3+x64 (darwin)","description":"MongoDB index model.","directories":{},"_nodeVersion":"14.18.3","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"devDependencies":{"debug":"4.3.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.4.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_3.11.0_1652346296251_0.5092702992556775","host":"s3://npm-registry-packages"}},"3.12.0":{"name":"mongodb-index-model","version":"3.12.0","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@3.12.0","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"team-compass@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"50cfd83c300061148f81e52fbfcef5658b4644b1","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-3.12.0.tgz","fileCount":9,"integrity":"sha512-zHtV2tLWbtMMSda6r3aPiCCIFIJ4eEqajz+1uTacTxh6MbL6s+E1ZvO0g/vgBJqI5isP1SkdSGXloBVqubm7xg==","signatures":[{"sig":"MEUCIA03mShWNgw5zJTI82G/q7xw8P5Q7eyW32v5vRXrDxRmAiEA4qly8phuWSeBIzpS7lpX8GhxnMNevxW6COJtYeC0VQ8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47171,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiuWCkACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrqFw/+KjcQr3C5m8UZ60whqirrEW7nbQ603ItWTKTu1Uzg2E8k3XOT\r\nzuafB0MjBXWBojrho97i+We2UB58YIqJLVvQCuXv/3EEA+NKXkWGAoOgUDik\r\npyp++JGBZ0cbcczwm/fc32EVlX+BA2pymtO8oPxNrdkF0igz9ag4YF1Mzn6h\r\nhqib+GQDZxg3A8ayvEn0ByZPCV7cArWPasUpnf+cMETsCGeZC+whfyFreMPe\r\ngXQzQ1lMz5NV2ML6+tXIZNDbOU3IZWW/mt0rz2E7vL4kAO05rZqkCXdkB2q0\r\n9o5RON8bQCvqMcgPhuw6aMpWzEdrUFKnIL3QYrORHrV+/tOhwYMbwd7ogbUP\r\nMErSj9DtRQRgtX4sE7ltnCmP6KzILaVF7FkfPg3AjyD/iFVDOz+ABatQLlCN\r\nHsNYX4Xt0IRzJYf+mStMwwM4exSRkhNKrMWqy0/xcT6bb3bG5WSnGpZPh/xA\r\no+3kcQD/hYlrz/v7bUt+9NPPfUQ/wbcaO75inmyXSPhY965gFLH5GiMkmDp3\r\n02VyWR0Vb2a0DQoPPdrJhzdi0I9ZzbdjmNZtCbhqxh23czDuWL/4Owc/aPr0\r\nBYd0HFKWfXJTWpK6gacIZw0AKGcbd8U6Fipgx9bj2fuzWaSiwXQ6mPwDZS5s\r\nFNc5vd19fjsUIXmUC12F8vkKsyb6QOxpu0s=\r\n=kMw3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"a4e705ec6d13393d2e14e906838bb67548e7ae35","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.18.3+x64 (darwin)","description":"MongoDB index model.","directories":{},"_nodeVersion":"14.18.3","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"devDependencies":{"debug":"4.3.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.6.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_3.12.0_1656316068125_0.6743635239286729","host":"s3://npm-registry-packages"}},"4.0.0":{"name":"mongodb-index-model","version":"4.0.0","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@4.0.0","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"28f409f87b668a58d53c5049de2cb859c1d21e17","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-4.0.0.tgz","fileCount":9,"integrity":"sha512-nsXfoIrLcKwiSnQLMIg3je4N1lCx9EwJKiu5g6w+OUoteDbLvtnmIzuaWzX8qERINMrTmmRRdFOR/BGE+yJgiA==","signatures":[{"sig":"MEUCIHu9xIALUIb6Q9xgM80R5NNOki9zx2F24OOg+8Cl5kjFAiEArKg99themo9JPsuI9totGvtcaBpFkKi5Id4jcNs5Dqo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47171,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi8mBKACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqNVQ//Z59hpsb38KLZLPo6RWifHQ5xtjHnJO/AFBe7qU//t2abBsuF\r\nPGUZLWvnqXsnq+xIggNHi9Vj7QAs40PKSOUIsHGTSMTZsy+uSo/Ol8OiwcLM\r\nQE1JGI8k1BmDE8xNrJ6BT8hr/bl0DNUVboERumLkS3oySwXBTJgvhBanoS8W\r\ntY4EkRTlOOvNOr7t46UsK7lnt0I/1SjYbTIkoedpg1Ple3Bfq08GEJvFd6Ma\r\nmZrfLDPBMmkrDcWaoMyNOZ7RDJi/+Z0scU0yEJ8ypjrVEY0Zcg+3gPIH4uxl\r\n9w/afP++BEnlLFQfatrezgt6NSLMRoUGe+1SNvw7f+/t1w5wGrj6115OUy+y\r\nZNBG565O4d6I9NJZXqE14Pj3tuMvsy/haR0sl9sahZ9B97sKV70mdB4cvyMF\r\nDi63GxbyhITc+/Y+5U4eCfMLUCcDGhenrXlKE7LsE6GLgJRGygL4HEK83wi1\r\neSJQsNbwXq8p3L4fv4GDZZtoClMvjRDATVf+2UtUp9udnz7xpOc3YlXdEqty\r\nTdZ5FVv62CjJepR6lCWBnZoIoQSEGy2/nHkuFXW+JMYvUzZxVTACeV09CZFp\r\n4dSKE25Et7osLjI72SHSYU+GZ1j8SHlkIlMvqiOk1FIXOcmig43bx6XlpQga\r\nS/9L15RqHfp9213vLXX4yrpZhIFBPYgfl8U=\r\n=FdR8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"a30734888ab496a07d58e26870e5e33b374e98f7","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.15.1+x64 (darwin)","description":"MongoDB index model.","directories":{},"_nodeVersion":"16.15.1","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.8.1","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_4.0.0_1660051530630_0.07447418495848579","host":"s3://npm-registry-packages"}},"4.0.2":{"name":"mongodb-index-model","version":"4.0.2","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@4.0.2","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"e05209039a4470180cd1d849407bb412359390ca","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-4.0.2.tgz","fileCount":9,"integrity":"sha512-4Anbr7DIeSs9JA2BQIYYWQUFTJsqXWTBsuwiT7OYz8GQw9DraCHXQ2yLlARgLP0Wble4+nYF2Gl+ZnI75ZDI3Q==","signatures":[{"sig":"MEQCIFaMpVSpvBXE/yqR7jptPJ/L1MGClpt0HyHbuFPvnzAVAiABIzIVn1m/z/mMVL9fSDAftiIlzSSK9d2js4y0glGxTw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47692,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjLHu+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpYig//Z5SUzKUhmgcB0FoOINGXTtW/m9stpDJ4cBPM1ErmOQdBSc2A\r\nyQIDQPF1FY4e8mb4yngNDHqcIrJPLQkBXg6sJgeox/b6KD9VOIamiCob4oti\r\nV6fJHoTLy+CZTmgWjMDNsAmxeVv3YVmYefT/jFXMw8BYTJLrQ5417AvHt7yH\r\nGMPwq7CFY6eCLf1xOS7UFXbKdewbkdYRKIyc2rgh6JLfH5yqrG9bJvH9HfRl\r\niay96pMtrpjS0JEi+SkDM31oe3aRJJh4t+FF5B4Pb2g4LH4dBymAO8jWVExq\r\nQVV0fF8jxWb2sTp5lcWzYlFS5PTU7nAG2S6cX4+ygBhNQTMigfAnSX5yscLk\r\nXcfM+PQonif7c+i1fZH1TlrR4cX7oDY0dn1YjJ0IXyEhhYJ0W6Y0hgn4U/bm\r\nzM3DTfvDVubNOJ3jimWFK+5SASPLIE1DmclGQyRiPGS+X+EUI9MQ6okNjjVH\r\nhkO6hCjpApEG5bIkVuYlxF/dO5Sow0FRjfrNqKvCdAOy75Wd5C87NPG3T5jG\r\nAdJZk0ZEq2kcWR1k1ztB3/TARYYTvba/qGK+4qENJy8QvB7qKCEhLP3lWElh\r\nhq4m76vQoM71S79Dqd0TiX1ldQ8IN9W5jT6vwHB3Lv3aG6pjF6YKUhf6azeA\r\nR+7geMRkjz3nhIa2b2u+tAlTEspo0I+qlGw=\r\n=TS/Q\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"51f04a0ac45c3b51a3ffb98af390c811d1404380","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"alena.khineika","email":"alena.khineika@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.16.0+arm64 (darwin)","description":"MongoDB index model.","directories":{},"_nodeVersion":"16.16.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.10.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_4.0.2_1663859646788_0.11487211884885484","host":"s3://npm-registry-packages"}},"0.0.0-experimental-1c53312ce4905234885618d41ae95fde9c21aa18":{"name":"mongodb-index-model","version":"0.0.0-experimental-1c53312ce4905234885618d41ae95fde9c21aa18","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-experimental-1c53312ce4905234885618d41ae95fde9c21aa18","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"9bf5be780e810ad37925db8438b96a4d5a7a902e","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-experimental-1c53312ce4905234885618d41ae95fde9c21aa18.tgz","fileCount":9,"integrity":"sha512-Eat2syy725pBXo4BdJjwdMTBGsseHY93n+3nLmV/YdJMPoqIjjYvvGGgbUHMLiOBTcZplBGH2Z3pyEs0O4d4WQ==","signatures":[{"sig":"MEYCIQDd9o+yxlWF/FXMjRwngO5ndod8aiXlVam7O7ugjFfEWQIhALxQFGBmHaUnSTFKdeDUlPfZ2qEiBA0eFGSjfe53fe5R","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47746,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjMaZKACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrClxAAmOCftKKBXYRyicOXCCKK/6lYsWJBHF1zftdKIjIzDjYgI1bH\r\nDX0n7VF5P8hZPrcw5k6qKpnvJWoDjnNKynPZNgcSBhPYwTB8qMN+DfjSmbZh\r\nIZKQK4CL0kYnngXTGgjPdKAzOt6l/nf41mHlnLMGRfwcsQWsIuA+VWcQNooY\r\nX/so7w4JQOLlYsy4jsI3FZtyoy26n22A4k7td9KBxRmz/qmIwzgYi06XHumT\r\nbemY37A4l7g7sNKavyizmEx5GUYqdv05J3L7yE6NzAwp4XZt1aecW4wjWw9x\r\nUgPBnrG4ehVfStCrRch9n66YSFPYnE3C6JIsARB2opO65FsOqAS4dsElK7oz\r\nyXEgw8YwtmEvcLsF14ORCykQqYyw7tYpsv/0G3XHP9rfhg+mlRV+0KVlmtYu\r\ns5+MeIOquKr1nCZRPWJHplolW0JIv1qCSxPKm+gHtBK6zuWwikdb3ij3pwVt\r\nEiOoIpMvSCh34kwwgK3lXM4uGMIHi8oWJPvaqqA1ZVb/5pRKJsI5Yblbp0gf\r\nfAMFzFrwWOiPERW/9o/mVgiZ2UW1qPiIIKZ0oKN/YdoJBlSCrlO8+UqvUBDg\r\ntro1debZfLHOOmC2hzLGLstjHa4DNtJ7Ak5mhwFMnjRqr3IIWx6UJr5Hhn+M\r\n0nodlhBQOWiK0ubHl/fqrFdBziBDkFZLTgg=\r\n=//1G\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"85bec9e9b95acd9ace066254edfc492578f4f8b2","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (darwin)","description":"MongoDB index model.","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.10.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-experimental-1c53312ce4905234885618d41ae95fde9c21aa18_1664198218237_0.6088639827292726","host":"s3://npm-registry-packages"}},"0.0.0-next-e30a9e850a8a66b70770fbf6658a3e35cf1ff8b8":{"name":"mongodb-index-model","version":"0.0.0-next-e30a9e850a8a66b70770fbf6658a3e35cf1ff8b8","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-e30a9e850a8a66b70770fbf6658a3e35cf1ff8b8","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"d8ca36d8dd363d71ff944ee03d8e6585ab9bff69","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-e30a9e850a8a66b70770fbf6658a3e35cf1ff8b8.tgz","fileCount":9,"integrity":"sha512-/pB2K4L7sGVe4dwU/2W/id8aJSs5eQLqVoX1AqUaRaffafiIXPlDtnMbIKH+qn8+AAIoaT2zLUS+JkW8MRXj0g==","signatures":[{"sig":"MEYCIQCUmT5HqBChZF/qtHfbkCw2SDi8o7GeqLwrHbir0hMFgAIhAK3gj9/aK1DDB6XW5cWM+dE6ryK8162RFTMzm3kz8mVf","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjMbIVACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoWgxAAnsjEnCUxbXBpHqSJ/kb8s6dFq/kgJeiTcXPvE9sQh/RpqCXZ\r\ncdiaJKqW8KIVKzhmxD87WywHFwHN2ti+uxsc8LSddHjAENwfxtjZigUsrwQS\r\nNFsS4NDT+0cH74B8FnahAckv0hsmA2kQt0RS9i/AZIO6gtapmOy/Se9I/yD/\r\nqce19ByApICMU6TSF7DU/6k66NqDPQC4yuJic8TICCsfT7Xtk4XpdE1e94f4\r\nXCF2npc/Uf8vhImYo3arzCHFD1hociFL5P2UbH+jlDnqSObmIQbNobZAktBT\r\ndKj4iyHOUmAv8FfxV9LtV4uvzgxu2Mtwx9R6wy/LFOJe2iOjPcGKt3qBjl63\r\nyBAij56uSD06F5S8rbuim/2P7Xk7NucEx/OVreIGf1be7t/80IOZceOZMGRU\r\nF7Q+JcJBpZOaAgLGow3eOvlDtONEmzv0EOTU17pBQ8Em22lqjw9Og8P+HHkP\r\nt8wRrEie3qeSqPrkOHGSfCxIuHQapz4s+MM6CRSDSFLHx7JctFe8pHC2vTiN\r\nxjtRxTt75C6m6K9Kdl69WtkeF5MB39Qcwf5hvLPKSdEDKEEGZzqJ2EbZlqBz\r\nMcEzTiFXWiunesriE82z5caJ6hEXy0oZulY1GZNHMK5yvnHyeeV3bkZCeM6R\r\nsXs50GwdJHVKoWCNhjjdIY0nipTeK1H4A90=\r\n=XvMF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"e30a9e850a8a66b70770fbf6658a3e35cf1ff8b8","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (darwin)","description":"MongoDB index model.","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.10.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-e30a9e850a8a66b70770fbf6658a3e35cf1ff8b8_1664201236992_0.18549854822727907","host":"s3://npm-registry-packages"}},"0.0.0-next-25b11de63d51aa4ca7fda0f3eae67999e3418ca5":{"name":"mongodb-index-model","version":"0.0.0-next-25b11de63d51aa4ca7fda0f3eae67999e3418ca5","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-25b11de63d51aa4ca7fda0f3eae67999e3418ca5","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"06d2a8b623e56ffe6ba59de01ef8a4acf94880ba","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-25b11de63d51aa4ca7fda0f3eae67999e3418ca5.tgz","fileCount":9,"integrity":"sha512-LrAXS/jTW2YIql7EjPDuAK0ADeiKtfpHA8O5kESUCWgm6l9nKc6eQz8atKxnKJDmjWuVn/guCl0xGGDk+FWaow==","signatures":[{"sig":"MEQCICb5rDDgz8RHKBMhnCQ9LZyyuOd9Cbd0xzfETlKh4f65AiB/ZDGcZHakOwIFPfEn+HjD/ezicC6Wg94bExbJy/f6sQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjNHwiACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpYTg/9EWvhLD6yNBPUt12MQjZDwKISxazbMKny6fmqnqjCCfGf3blC\r\nAbYFcwG5tfeYDzpX4dKL0j5BlObyMn4y/mLjcD5CUySDK2+rPO1sO1bZkuu1\r\n+o095KwcAFVHtdGX4Fu02VS3x9wD2vNKIPMT8btgJkOjNim0a6Rkimj9ct0d\r\ny2jH1KeFopTyJO0Dare8mcDv6BJG2hc/IRk1v0fHUdmXb3xizSAxNBTOApQ7\r\n63RN9jO2JXaMm9QmAnq9z5L1+1nNh2/NG9xUnONzglGDeqcTJwG1/SYykcyZ\r\ncIZB8jDlYWrqDmUy6K29Hw9Q+S8HBR7d1W4WqGjoZeeBZTeo/DoxAMXo/u3Z\r\n/sUCaV6WDfUxYD8G0eoiIdt/of5A2M48beDD+UAUTyi/Ex4wnbX6vPyuGg/b\r\nvcEXjGzNtkBrrySItY5AwnVFJAHgEMO57YaDpXyQcvjrTGC/mUsDz0XRIiiL\r\nMtwvE0Du3ArT20ZGaHPtoqc192kRVZd/6y52FjzksA9VMfdbZySannRmfYP1\r\nt20PAm2tYO1JzY03KZ6BGmHtksKwsI6rKmC2EBJyhGcYbqBUXHdk+S/ILRrN\r\nHmvlBDKfBt7SO1MOGf18BBRmnN/H3LJhI2LCLXhtwr6yUHzzdWafZdZWA6UE\r\nMxr/Ytjxatz0AB9sfDPtH4ti8zZfYMSclIs=\r\n=Bp4x\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"25b11de63d51aa4ca7fda0f3eae67999e3418ca5","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model.","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.10.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-25b11de63d51aa4ca7fda0f3eae67999e3418ca5_1664384034730_0.2991813393379743","host":"s3://npm-registry-packages"}},"0.0.0-next-dfa464112f63969f158bde32322e393fa2b77940":{"name":"mongodb-index-model","version":"0.0.0-next-dfa464112f63969f158bde32322e393fa2b77940","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-dfa464112f63969f158bde32322e393fa2b77940","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"6099ee9542ecccd74ed0a568677244c0b8b82dfc","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-dfa464112f63969f158bde32322e393fa2b77940.tgz","fileCount":9,"integrity":"sha512-jAxNzcd+UgDhjgevfezEV3TTpB1k4yZ/cNtepCzVj5/HwCccKjidhMHy/Qz7rKMeWCUbCHQcTSjouV/DrOu2JQ==","signatures":[{"sig":"MEYCIQDS+nvD1PHmm1gHoyKItnEWjZxGaj8Bjn20suromkXTKAIhAL7nl6QbMLATJZ6IgY1WEj0D8qkNK057XBdpZcsZ/Nx/","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjNMUiACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp+6A/+Iq+c11PANz8n4v6Y1vffS7eWJS7dkJGb20iRr4R/GZwH/sl8\r\nq89HC7sdc1oxyc/odQrkUzFpCjHYtUzt+wggBhwqLNuceJMCyQX7o6491erw\r\nEtpbERYT0QQ1qgVbo+7iGE9e8Xd3pO9awKnsR2uajuCk47LGuQdudOF/I5rr\r\nJBts+dpY0zZEKk+YMxx1X4EXr/0oIlzRUcQXVPf4FYJ4U71REj+WzIUQZ67R\r\nZR79PUX55Z4qhqo27zzk3EkgcvaYF6fXOJfNYynTufqYEaLDVZgwccP+rU6E\r\nYgEcXg7j1oqTEhgk/3PXStHUOcFz667tyfObHdDTyZSO7NtMyyNxK4nmfb7R\r\njQoGOzS+qx0+qRvIdwWYbqHHafhaIQ1DdvmLXwGH5UvcPqoZrpnL19tq5JON\r\nGRlmTomgmJto8gGlU1m4GnELmwWPBsdYdiAyJi17WB7Y15F5zDZvL/u2/9IY\r\n2txIc6sPq3T08b3fgDZKlVa09GjBmYdoey4EJTzdAPdtgGW1VNXUz2X2DavA\r\ntGxllXH5J+jR7ev7/SGnEYk6/+qExC4RnbhZIU62sIeNKMkvUXgxIl/8JxIt\r\nWNa01dlmm9SETCXiobza7kIhOKEKeWtllUioTWht6m1UpcrwQgLO5nngzGjF\r\n1SEj/UszpfJm11vXsGHDFZAaiu1Cdq0q6vQ=\r\n=vfEj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"dfa464112f63969f158bde32322e393fa2b77940","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model.","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.10.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-dfa464112f63969f158bde32322e393fa2b77940_1664402722093_0.06041560877600949","host":"s3://npm-registry-packages"}},"0.0.0-next-e42d58083be39ce9f112e6ec7f9fd1fdcb666e3e":{"name":"mongodb-index-model","version":"0.0.0-next-e42d58083be39ce9f112e6ec7f9fd1fdcb666e3e","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-e42d58083be39ce9f112e6ec7f9fd1fdcb666e3e","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"fd84a1545dd35f3e9287694819f99159b82f6afa","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-e42d58083be39ce9f112e6ec7f9fd1fdcb666e3e.tgz","fileCount":9,"integrity":"sha512-Mp1XwrW/bUXTqHiuoU7zIbiw19HxmhHmqBkmCqSWJ4PbKlrrDs/s9vRKbgm/K1cKydT+uIzXHnyIT6xuHcIcgA==","signatures":[{"sig":"MEQCIAP2saqDizQPfx9kyXDceNFxeN0TR2lrsucRyy6gY5BAAiBN6ztWOJ+m7hHyuRkQmZgd+PNhCtdHI8f+Ds9Xd7LJyQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjNcLBACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrYyw//foRP5wjDYV9R20i/uRi1tx5F7NqjrPzblM+HKZE1gAzAQfvO\r\nSTSG/8ILLNZ29qRnRfl8nn9tnDtk0nkdjcEvFgg+ytCXbWe309MW52PCNlGa\r\nSFYy806yojA8Qnha0RleN67+hD9BjuWgWE6rm4q5MrWDtjEziK20YmltUHfh\r\nQA6zLXL9Y2ILeyBgYUKnOkwoGGQsX1uf5qqlD0ckYuHFLg/E1cUKVo/cOnCj\r\nRSyemEvd+7Yvf1aML0KuNJMZ2caazZJ8E7frluH6emKximdFvfQT1ZjUlvmY\r\nOyC6TEmJOvxXNee+NmVgFBR6GBR3MZjfJymhOtw0/FLWB2sZcXURiDlJUtgZ\r\nwhOPAe+aOUAnZWJWgy+Z0elPDNywyVZpAKxuIHMDj2sJFBJE0p//nMNWrIdM\r\nY2oaq+RH2yMUCHE0PWE7jLarAZt9jB9FAaXKaFpVQ0AJDc0Yu0o5h95fx0g5\r\nZO8dB9m0M2Mj7AUVLo0VZCAV12r1AacEH80SO8fy6LwPLD2Zx215I7Zxy8Q9\r\nvNqPrMT+Fs7VZDoJZhW/pfrhh3j0QHAykZXD+8Usxqe0OIsWDfDqMQEq2wQo\r\nqd1fL//IQtM63ABi1gT7SXhWRLevgCVP9w2RG+P3QfTF1vSCvS1gSKNg0g3z\r\nl8R8K8dMdUsVkXlDjnG5jJuMvkWIOMkF5HU=\r\n=uPv6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"e42d58083be39ce9f112e6ec7f9fd1fdcb666e3e","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model.","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.10.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-e42d58083be39ce9f112e6ec7f9fd1fdcb666e3e_1664467649398_0.23334168117337328","host":"s3://npm-registry-packages"}},"0.0.0-next-5f69e8129e0242b4e507fee055188a8a83e1f1c1":{"name":"mongodb-index-model","version":"0.0.0-next-5f69e8129e0242b4e507fee055188a8a83e1f1c1","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-5f69e8129e0242b4e507fee055188a8a83e1f1c1","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"5ff1d5ac1c46b9b177c78048387f9d564fc30f78","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-5f69e8129e0242b4e507fee055188a8a83e1f1c1.tgz","fileCount":9,"integrity":"sha512-pDdL4Dg77Sc0tvkSpVkDTxYRjL/GGI5uwezefXaZOte3ccGvQuUjnP1X+oYbgAxMDv/XVz5n88hIHipnkL/RaA==","signatures":[{"sig":"MEYCIQDZzCO4iBxBdsvw0A49F5B+1PR8HsLNpwIRud5FvOWCSwIhALNwN2PhTUvNk9ZB8gYB3U++BKu/Y5bUXi3KkOM05nv0","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjPWY2ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpLRA//bDxeGgVjmhNr3XcsSmygx36EN0HCm2LhM78lluL9sjNY2QH/\r\nk+DIJ95pq4a8FEQUGatVgaMqzQKmAh/mNtpdEAQokg8WSsXWuR9J2O5NrA2O\r\nPe/NJd+kKTbnIDBQpiX/ecc1Rq9j+Vmob+sHbu/1yfFKr4OPW7tkWVx++pc0\r\nOq/bwqImfTLbMf074GlMsQgPrx7lDBkUfIWkNCOOuFpL/FGlIA1D375/0EqM\r\nb1RUH/xtIPxjJ1XOwMZgLb6rEStKzn8K/Dy+Es5kNEBE8qBy91ZRMqJz6Fwl\r\nW24ZQjO5EmbYFEEN7pl685g7piE9K8+vo9swWfqg3n4vglgOOYGLgGUihiqc\r\nr8qeJqNfXoMhuU5rIJ8rnLvtWe/wOkt/j+ovhbvuPtadCoAkdYEKwzagb0/G\r\ngLfvCU7xWLF13Mae+w1M3Hv3esZil+VU//dg0RXYhfS9sOMiTN60MHi1m/t/\r\nxi2KWP7353PoPtbpdLlxBn3adKgORPsTRhmAElxUh/TpULrXSTnv/YFuByP9\r\nueMRlynQGoJPcW275pl2HvRm/CS3OFARZlBQjpKSfQiQ6SFM1NyCblSJdWrL\r\nreuEPfdqydW4kiFqZcwhHM3qKfrPTpL2zJEDXEs3lFDFsitM9ibixd6qb1gK\r\nHxj/krejQq9qiTFxZIx+gEzfgBPCV9zi9tU=\r\n=I3IR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"5f69e8129e0242b4e507fee055188a8a83e1f1c1","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model.","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.10.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-5f69e8129e0242b4e507fee055188a8a83e1f1c1_1664968246515_0.9793851377916463","host":"s3://npm-registry-packages"}},"0.0.0-next-823f55a862f13d28437b87fb594450b2208c0d4f":{"name":"mongodb-index-model","version":"0.0.0-next-823f55a862f13d28437b87fb594450b2208c0d4f","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-823f55a862f13d28437b87fb594450b2208c0d4f","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"bc6f99d02f9944518b3901df880296da7316a9c2","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-823f55a862f13d28437b87fb594450b2208c0d4f.tgz","fileCount":9,"integrity":"sha512-6Iu7qVUSBVgErKiqMJV7ssKdOqUMRYo8+u4Jxvmo5sd1++36iOJfLV12cCiBBdcYHhJKCpaq3tWOKNlPxUHeSw==","signatures":[{"sig":"MEQCICqPKkHDw7c0Sj0pFJjDp6jEytXzwDp64UDUNMlzbf9vAiB8x1CZfoioX+HFS3ZSlq9Yj2CZHurw6m2DCKUVB4HoAQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjPa1+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrjNQ/+O3HM0cWeCAS2DmanwIDC9Hk1V2sig4UAkYLKyZIfTv1PJ1eG\r\nIruNP1pkb2IxFAH9eJfcSgsh87VK7Ajzx4x9woANn3tFFsVkLarM8gzkR430\r\nG0/SiVDJnLcCgrL42VsfeaCiJjdtYW3bYbUL+NiIebsjhQEOzzJ3Sp5ONdAj\r\nscrl0b7wRY1rum5k4r4MbGd7E9jl/W9pZSxsxRmAtDeTMgdvDQd03kmnESeS\r\nWmbklWpfUq3GvWE1oKSa77FlF37p7B6yg4N7Yucp1fMBM4qfy5vhJaqe4gEg\r\ndcn5t5E5yrqcZXSJao4CO5L9V3I9diOliwJF6wqIVMhsvGpH7g0WLllMAh97\r\nyy0m2tQCgdoekaUMaPCjtrI6Ef1YeuO5D/1p6SZ1YygMhFdDHf5ed6y/XqN7\r\nvMx3mzp1rEDc7wlYBDmBL/iVIWpexKHMA5XiDMcEjBK27JfYkiuVb0AmO9l3\r\n3qoQt7e9GKR4Cz0q7JO1ZRx3KUp+5kVkiOHO8AqLXcOr/jXMP/w8Kos5lw9U\r\nOqyicdjABLVJ0v/VUUOT2c+BI/c4u4ayncMC9/KUeN3CXtZKVrzg8lINK3Np\r\njIF9AKSNcP8IFo4sW+lyHX8cO70GYOUDBnXFB9qO7z18ouLYJxvXeqREfl6P\r\nIao9bTyGPO/SQHyDQqKdXcwSI0xCDCMLkxI=\r\n=aKoH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"823f55a862f13d28437b87fb594450b2208c0d4f","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model.","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.10.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-823f55a862f13d28437b87fb594450b2208c0d4f_1664986493955_0.6648039050482231","host":"s3://npm-registry-packages"}},"0.0.0-next-01a3ac56d52443bc859ccdcf7ed301ffbdea7a47":{"name":"mongodb-index-model","version":"0.0.0-next-01a3ac56d52443bc859ccdcf7ed301ffbdea7a47","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-01a3ac56d52443bc859ccdcf7ed301ffbdea7a47","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"b71bf3a090d3fefb711870fb3660830776b31f5b","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-01a3ac56d52443bc859ccdcf7ed301ffbdea7a47.tgz","fileCount":9,"integrity":"sha512-fKmfwTdqp2sdild5l10Erwd8qNXVzTjODee7ZArsUjFv40g3jvotpAVbUw14V0q2gyPoUiJLO9ZzI2iOYuvyyQ==","signatures":[{"sig":"MEUCIB+bON6wf6mbrgxONZOhfv+inldLn8pQwsgyVbwD/JL7AiEAsY4mCcX1hSQwUqgrLVQAguppYHG+LjYdjXAO7JZdWgA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjPqQFACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp9qA/+Opud9M7qEDt4UDQ+Nqxe/R0Mn35H+e3ZmhSpxJDVYNQPPOTq\r\nPc8bIFxw2UyHg1BIKGUufHk0GQqcuSBAFM7oJDX4KiRytzGbBLO5XTQo+RVL\r\nCnH1vN8PPJ1xHJqUmLVxLQ68uR6xqLBmUkcfCGWON3GFtdGVYiHXdOCBkDls\r\nKY4ZnnKaJ+p4SdOky2u5pSGNGCMXl8998gURq82dVlFIWVrxghpZ2SoXCJM7\r\nCtCzzi8jdNcrZ/juhZnEbf4G0pzZcKIKzim9CH8ogC1SHEei+VMZjJnebSXG\r\nS8wNpT7g1pNNC0i3Zd+IGUPhu6NznG3uob7Irp1kLJ8sfXyRQcrd0fmoBm4S\r\nbKcLBj4EcxFMTbYbaz/l/+NA4mviREJUYWdSHbo2xDt4v5Ywei3E2QoWgFqM\r\nAqUc3ovukbdXhGG5LjIpt4DKOgMFi5HKr3xgwJivuSsmA6Kex8P9o9DU9QVr\r\no1anQjFg7Qb5MyL8DJIHQ5QRyfNWG2JbK66UdaM/Z70XPuUQ6CV1vFoWcgmB\r\nq+ASS4WoI/1mrW7QFJFSAx20orHkPHHy8sZdGtShnvUer6AkMSPWLpNT8wCN\r\nloQvMZzo+Zvpzve983JEhNw0Fn9QQcMclxVq0Ptj/srt2I7Xq4HZbQ2/B6OC\r\n118cUn6r8Q24BTItuwNAE7RkKcENo2FNZCg=\r\n=TIn/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"01a3ac56d52443bc859ccdcf7ed301ffbdea7a47","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model.","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.10.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-01a3ac56d52443bc859ccdcf7ed301ffbdea7a47_1665049605700_0.07054885485648543","host":"s3://npm-registry-packages"}},"0.0.0-next-cd3c5c1303c464ef7900dc08adb8154d15c7f3a9":{"name":"mongodb-index-model","version":"0.0.0-next-cd3c5c1303c464ef7900dc08adb8154d15c7f3a9","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-cd3c5c1303c464ef7900dc08adb8154d15c7f3a9","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"7b8a4bae8be559421b24351dfa1424741845c9cd","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-cd3c5c1303c464ef7900dc08adb8154d15c7f3a9.tgz","fileCount":9,"integrity":"sha512-QcdJuXbkR/f1PLVQwksggABqQeztUayCyzqe9xoxyl9H92XkT1CQBG7qdDb65L9GIZGJi87swRx4WzLN8PKvQA==","signatures":[{"sig":"MEUCIGlweBBmflU5lOsACmRkDqs8TSbXIiJ0EQ4wLZ9PkH5NAiEAvLzEBjk5CGjOstb4o948PBU379gHDwbZU44lNGga4p0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjPumwACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrLEg//SAuLm6fULBOa+DdtTbVaITBon0+jSdGSRWgOoCgqlmkI5CH4\r\n/3yWcJMWeMF7aO+G+5iOe/AUNcUOPmkV8+O5SH0T+tuvtVELCTy1oQgy+ooV\r\nRSbn7mHjF2XD0Hji5SKn6aht5bCu986XrwBkxqP+n2XEQwe+1+Eeyi4EdxVh\r\nm4EvuOjCy7Pm38Ngd3bDwMA52WmLrH2/H2JT/eGvlPfagjhWqPOc6HxU7lYY\r\nogTB3E+Ubk27QtMiYorZC+xP1dLk+/hGkbOG2Aa3WW1RHxWN6Jmtv5NLEDyd\r\nm0Voble//9kMDthxUt9Ps8RSDbXnZeUvqWhiXN6DykP5RwFHQ81LsngMkje5\r\nsmxiSmiTgFV5IZ1t6mJo0Wr+zu8C5/tRLhokYAIuvHmfvaBxtqsuLfY7Z9OH\r\n7dWwlVDl7Njun7GLfrR1oEYrsNaX19QDNbLGKUwHJxjXT5in7G79YYEfVJfd\r\np5cUWoz0pxpMdPiLVAMtP4KbKDqOSgtVMKDrVWDq/TaKSQ856wU6pwhMg5+B\r\npa3PTlXi3b0uR+eI4mP6jvi6iY5Y0KirYUxKX+ONY8VPPrY7w0LhPi6edHvU\r\nJ7eagpBKiu7zcypdzR2PCPHh3jvPCikPlTVsCUBNwtfveORSWRLaYSJ0SWY9\r\nkD9UIpRIuAY4W+lrW58VIlsCJE/WXSA+yV0=\r\n=Dh0u\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"cd3c5c1303c464ef7900dc08adb8154d15c7f3a9","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model.","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.10.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-cd3c5c1303c464ef7900dc08adb8154d15c7f3a9_1665067439854_0.2127387139820609","host":"s3://npm-registry-packages"}},"0.0.0-next-d9691f3c8230e21aeb2817ac2c984aba0d79f09c":{"name":"mongodb-index-model","version":"0.0.0-next-d9691f3c8230e21aeb2817ac2c984aba0d79f09c","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-d9691f3c8230e21aeb2817ac2c984aba0d79f09c","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"d9e06c1eb1ed2090d093d85c4c2d94b0b44a24ea","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-d9691f3c8230e21aeb2817ac2c984aba0d79f09c.tgz","fileCount":9,"integrity":"sha512-LaNqYkYo5ICynJTjqLzagce6a6uasumhgljY6RXJRJR6/l13yEPb8iBeXemG932qiabCAjnUzQlWC7GqMdWPZw==","signatures":[{"sig":"MEUCIQCVRATur5ZH4JnU6ihMtt+WMtfbLNKxdI4CAv426SrI6QIgBKPUoFy14GhYReCJ3XXVpELdFLej+BWyEkPyz1qG53s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjQIGhACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrG2w//Zg5pPG1m/ZQLDzVtTiRs0+/2g+AI3r97YXV5SA2PtFngyNq9\r\nZrop+Cs3iR7u4ZRvC14LkXe4X2RcXY652cHp2ePGPWel8d+ZVMYRoWdu1vPd\r\nEl0tIIPfZwfsLWuqxxXnfZJb8p4fqNYbbZFqBv3bM7J/+IclnHjmukejzi15\r\nZTlwD87yaGOogBOsKUwV7twg7ydfbj/5p9K1pVbFc1t9n5zF0XRNaawim2g+\r\n+9mpjQNk3J8XxSN8ggeJ2elLjQhlmIBEyl8+Bkc+zUg2BvgCdMNb8jQB8jwN\r\nslSQLEkdhsOwn4e5eKJ6Zqq3qkjIKvw5Wew5IaunQwLVbziqvPlMMWnZ8FSf\r\ndBMUduDhNB6VRobzOI3JLLD2fSEYBtfhuMJXVf817gwb551omm/XsWwpenop\r\nmM7sVcLHToHvd31sthpLpJc8jGhyOrmcD/ZEgpRJBvgSh7vUyE8gX+YAlzQE\r\nBkfBBTS+ex1HdqxSzQqPhXX4ITQQCxykmpac68hPB79CRO0T4GiO2hN7GqW0\r\nrkYr7V8aZSbYlH77ElNR9LIF05INTLOOz5g+XRwy7QPoD+yP+jSoIOkz3eEJ\r\nTleLbn7GqGIK38RaLRZIyuy1K1AIZewT6kT9ItOZwOzSRVXNq/H0lqPsYw2q\r\nMo3W8pFbIm1xgXxkZgi6+TUJVD2ayqt3uvM=\r\n=nzSy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"d9691f3c8230e21aeb2817ac2c984aba0d79f09c","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model.","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.10.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-d9691f3c8230e21aeb2817ac2c984aba0d79f09c_1665171872553_0.8233643662058978","host":"s3://npm-registry-packages"}},"0.0.0-next-1cb9ea1724d90e58422b33fe089df5b774e0be10":{"name":"mongodb-index-model","version":"0.0.0-next-1cb9ea1724d90e58422b33fe089df5b774e0be10","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-1cb9ea1724d90e58422b33fe089df5b774e0be10","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"8590672a0747d6cf854b775d507c326deb5c4a42","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-1cb9ea1724d90e58422b33fe089df5b774e0be10.tgz","fileCount":9,"integrity":"sha512-QS7P3dcSCxpfrujF8tURdpGtgFaBxpx6o4CEu60H9OlVsgwGyKhxpNlT+wJTeFvD0gxEiVaqBv8R/mOxwioYXg==","signatures":[{"sig":"MEUCIQCDxxCIOzoUsoHC5qeS6pq4SadtDyZ/M1v7w+80Z9VKBgIgAqPJPsUvwUOlaNi1+yGUgeu2ICu6ds9pF2mwvaYh0GU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjQILEACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpmhQ/+Li0c0+tvmDJ3CsPYHyh1KX32Vxjv/dwT3pHZgriwU55cCGvO\r\nUQ4YC8l1BHPkSAgnI6kDKgDmGJPgilY40dvYcogzvBE8FHsaz0kssNfyKHD/\r\nklNDdjZULvFlrkxMbY1SRmbAi9cjz5meydAWL0LH0DyDHebYVSR4I88vx1w2\r\n3sMPgac2aPy4PaWTx1+sBcZ2Q4YEb5gSAYkLV81E2ZDvNCjEg+HhGA5WkEW/\r\nHwl+DfBZnvgYNtlcdlA3l50NhBGiXBgCU9rgJeeIYHH4qeT7QinIMTzGucPH\r\nrv9deH0IWuFVuHX1rJmxDz1pv8T043zPnSKfPCJzjK8Gc32JudkkHSneoNRQ\r\nnPQifRp6hGyMlYcnfZ2bTsTREKNd+Ly1E8T0oESAahtEEhTQBmgKctn7GxCr\r\n6bGHMbyLxIDtrxIM0cMi9Lt1zXimYh/r+vxn2QLOTCs6NPCceqfW8/ldVyrp\r\n6URlliriX+FiISpeQEjMqwLisneJ53R07GoHvwjvo2CKs9IDHj6kDhQ4Li+O\r\njM0KiUOMtz9w3vAtQF3oVm+N2DWbqnd23sGPeP30jlx/ZM8cnWDlwF/puIyB\r\nXIFH68i5Lj5Df0dErSZHCuO6zKj1m3+Xy7Bafyxt2IJohgIsdeO6EzxVDb8X\r\nq1AYq8WpxKx/hYD5GyBS9cao5lUp6fB9TA4=\r\n=B4Pb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"1cb9ea1724d90e58422b33fe089df5b774e0be10","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model.","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.10.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-1cb9ea1724d90e58422b33fe089df5b774e0be10_1665172164303_0.332607280541811","host":"s3://npm-registry-packages"}},"0.0.0-next-fcba5cfd8dce9be8022f245fef7a84f29a1cdcdd":{"name":"mongodb-index-model","version":"0.0.0-next-fcba5cfd8dce9be8022f245fef7a84f29a1cdcdd","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-fcba5cfd8dce9be8022f245fef7a84f29a1cdcdd","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"c392516c4afde4439cdc3f0aee633952fcd794bb","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-fcba5cfd8dce9be8022f245fef7a84f29a1cdcdd.tgz","fileCount":9,"integrity":"sha512-eypHR7pr4J/HkmhXST4CsOP5NR7bkoasDRP3iwE8VS3eOU30k/DR6tgwUpinaTIdVku8+2piX/TOBEAV0xOJRw==","signatures":[{"sig":"MEUCIQCBs0PwTD8jAJZ6tgxqxXXGTWewkRzd8404DozMh6lPBwIgT9bUzwA/TP0297uVB4pi+OKoQA2T6+zqltTEOxX3VDw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjQINHACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrIAg/+Lb0p6gVVtb9L/hZ+NX2kPsuB0cbxUsGDcOuBivvGrjMnF7G/\r\na/clbHVz37hK1OMtGJNDSOhffTz7mPk/EV57Ge92NOzvmBVqobysza3+OL38\r\nNfZD+RBCE/ERCTd/ouFpxxBgLLWIfVuE9jRzMk3NZ0UlXLecPP1M24/XGSoC\r\nwwQp56t2GIoUjrsF9KlrY1MUA5499slqHM91GA1NZtto6c9m+/Vgp0pse+EH\r\n2WlkfBkZwfOqFYnwB7mREz1BgP5ng/Q7vWVCs2hrqj8fqObaSbKEgBYqNU4d\r\nmK3Sz1uMxHPEGQLg+/XEml9SJn73Q1TcvgVMUt3r1VU8GGwOUXgDBsW2u13Z\r\nEb6MOVfSLPQvZgAqKBaapGYJ2MiBCgSqBUn0/6cRQ6HMuO5e6s/SDf4ZDOW6\r\ncO5K11OvyoK6fW0VWIgQhLuRUwNa8vFzjrDVTel0arC4xx2iOG3zmdJckh3w\r\nKPP/AMCU0xyhWMzk5Xj00II/WqGfPzfb78d9RLq2OfLLO0Au/KX9BzpG6cf5\r\nZYhHsTe6uq6+isRsJI0be3e/Zzk9ZLIeDQJcYH2WqRnC7jJEWIsjZGcwpZCZ\r\nUWYhVvfaDqHfbiM+8SINXZJws20W1fKLQofuPkecsCxY33Onkt/FDEUypn9j\r\npSnznCsXw0y9woHxvR8ffF2iiQCag4JdH4M=\r\n=ws9D\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"fcba5cfd8dce9be8022f245fef7a84f29a1cdcdd","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model.","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.10.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-fcba5cfd8dce9be8022f245fef7a84f29a1cdcdd_1665172294992_0.8302217284181237","host":"s3://npm-registry-packages"}},"0.0.0-next-4216a27cdf41425fff35938bb42040bb93c2d246":{"name":"mongodb-index-model","version":"0.0.0-next-4216a27cdf41425fff35938bb42040bb93c2d246","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-4216a27cdf41425fff35938bb42040bb93c2d246","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"fa7afa45e1281f2641bca80035d76df5dfb1e751","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-4216a27cdf41425fff35938bb42040bb93c2d246.tgz","fileCount":9,"integrity":"sha512-WkFpuFhykUy0+LpKWUSFZFNoNOlc9TVBEYRUfN23+gCe+b9D5dI8+4N/CTo5HLn2bMXuSOFAL6ZoTcBuiyss3w==","signatures":[{"sig":"MEUCIC7DBatd0P4qAw6DDnG53mXibwBSDNXHCMkQWJpROqY1AiEA8nq0qSxUcDqw1GZcb6VXPLrC0HuESfjfE18DGD+pWZ0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjQIVLACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo97A//fC3RgtyMLY3JP0ECiKTQDMWOHUG4GnPfqSQKAbni3zSk6vy0\r\nNMXVqgh4I4mrQGCtVVbyDFeZzj9urrYl5xX5kMzBFv7j7S+90v+KCZQ2dLsu\r\niO+91qoOD9cqZ+rMXZtK6GHBw1wVuA0YWcNdDqji3BB4XJZ6pp5qEdawbrq7\r\n7AB0hPSkVyb8Sr65aEd4yU9I1G8Iwe3YF4pp4+yQbZuAIno0eXllh49x8mR/\r\nPgoPaaYRVkbJv05AAba583o8MV0V6hOXEpalhjjjBk2vu5qKKCsnMmZuJ4kC\r\nIrA51x2RwPLyoeFf4YQQgeRpaKrx0nG8oiWkxw+rK0Lv3iMvHkN+wgAoQjv2\r\nrkq+c19UeZ6p7hi8qh5rdadYuR1t13NykSkzsO7Ny6xL+aaJMV6lJlH5/DW6\r\npHq5hp+CROL7IhqX0DZKz/0osnyOrlQOWeU4SFU6CtvADA8O4PP66/iiEev3\r\nwtPk/vZMUop2kXEGp0dICBfWYUy+2Em7TLfBAnom83Qnf+QnZz5XWVJiaYu4\r\nF+5Z1657KehXjpmYA863ScRLvOWAxd06Obd6llI8n9EPSq2QRRuSWQ5F9tAf\r\nTHv2kdJubGTuw/R+5D9fRtCoZ6GEGjV6hcwtPUBK55qU01QqKHZow+qgVwa6\r\nQBVONZpg947bCVYiQd9NQGIJdDNSTqXVNfM=\r\n=PFqm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"4216a27cdf41425fff35938bb42040bb93c2d246","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model.","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.10.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-4216a27cdf41425fff35938bb42040bb93c2d246_1665172811447_0.8100627769960631","host":"s3://npm-registry-packages"}},"0.0.0-next-e3d7e58db726184c34e0d2d9f3342595a865eb55":{"name":"mongodb-index-model","version":"0.0.0-next-e3d7e58db726184c34e0d2d9f3342595a865eb55","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-e3d7e58db726184c34e0d2d9f3342595a865eb55","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"9a66e32ec9078403019f7de584560c02a1567cbb","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-e3d7e58db726184c34e0d2d9f3342595a865eb55.tgz","fileCount":9,"integrity":"sha512-uWej9wos+ZJghH9hHxXnDmoPT0UXI+wxcXzfBeE/U9B1iZ8WY3qVHp5UGVubMe0PiKLrHqE2GevYBky1ZBdlCA==","signatures":[{"sig":"MEUCIGKizDV1ZiVoKLibDNr9YfrnulhKOWkYKST0govjt5fqAiEAuezmU3qFJQXgPubHTfCVm8vbqeUMRv8fdleCx2AzhXk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjYVkPACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmolsw/9E+tqbewvluPr0bteU9LAzE9x4HbJ3jQmxtT8rtfJzKEdeC6K\r\n+yCxH6FlAWqs5rwElgCAuSQau0p+rg92pJAKmeuHOJmFfs5bKZdZsr4JpB82\r\n/Le7JDJhJrlXoN30rjA95Rl1HoRX+yzFz+dLKB9BU2c5NsvcJPkKnSZXnHWz\r\nkuFNFeti6FiVnvZMPvolOe6YOFZ+lP2rG/k4kHE+ZgmuHo8UNhlDpCUx2htB\r\nx8XLFAUYhxzdfREPciEiVBtf1WXxlo6wfnc0XR36BB0l7ASAxjX+X3c/CWof\r\nzTyVOHue3e3FGmdlqJ78cVhEUZjwg86lJahblWLGgtGRoAKRhcIhWvDK5Vnr\r\nSJuf3JtMh6O6fYTqwas73OLqr0fmzVyDKOE/T9vT1KmUrNwl+wMWHlA72srk\r\nXMfy8WskcidLBs8HUUiJnQ6mQGcbyBYYi+2IwdFQskgzJNQQ/bNzO3/1XK9R\r\ngFC8G3KMebMdI6QWxobPwzX/IDyzQ+W3D0sbqUFggtTnHeoc6LkL7kWk4HzJ\r\nNqfqEkVj/7Zb3TTS02qXoRF5m/R0gY0Hr5u1YFsyHVaL2t6Ok76bCyJ3NYSH\r\nodcFF/L56RKnc8tZID5rGf0ylWwzcwyPIZaAdVtF3yMbn+uQu2PV7bTPAblI\r\nDezjoIhrwapup5tjGr9GxTLpIijHaIgezTM=\r\n=7x5b\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"e3d7e58db726184c34e0d2d9f3342595a865eb55","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model.","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.10.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-e3d7e58db726184c34e0d2d9f3342595a865eb55_1667324175428_0.7034854134195387","host":"s3://npm-registry-packages"}},"0.0.0-next-dd9be0f790095ebc62a3de5b5f33543ff3c55cf3":{"name":"mongodb-index-model","version":"0.0.0-next-dd9be0f790095ebc62a3de5b5f33543ff3c55cf3","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-dd9be0f790095ebc62a3de5b5f33543ff3c55cf3","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"0668641fb3ca362a412160d616b463a92ec4d21d","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-dd9be0f790095ebc62a3de5b5f33543ff3c55cf3.tgz","fileCount":9,"integrity":"sha512-vTovV+szpx7dTsrLHSqjvGO24JdPFq/2xUss3ZugkioYjj4bQx05pqgMflzy+Cik1wEk0+79bVoFHX/zL119Ig==","signatures":[{"sig":"MEQCIAU7uEX9UFOb95jueM+pGa94oJwK0JtFrQxHS8wRFwGLAiAm6VaQ0Lc8VUANhyaQ0EbRQFOuW3B5NzR2FXH8ufsZyQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjYjQpACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp1hg//SO3ogCKWAcEpipiRnhVVAuAkvi5Q7HxYWFsLIL3FmoEMckFb\r\nDBQNdI6gaL/I5fAlpRsz1zizKPRyqqICHjnH8uGhM9f9erc5BAYw2RHFSm7r\r\n930N55IbNDOdzUfPMG8u6FlvKSL4HSTXnm8Ra7fFt7fSo+PZy049rMXk4fZE\r\nU8R9ASEfyIV2BVdTkFRKdkQjnDhxNi7/FD1qFbAl/Fa1abUfS7J/W/2/xOZD\r\n2VMAHuIjkmB1++9Hpwxi4W7dlNGXjEk4xiLxAMWkJZ8p8alscmW9lTtX4uz8\r\nJbKW2lCOLJsNshTkwJPBIb9635i6usnv02C8fheHIVUioqsmCk/RGODP6xxe\r\n8OZ36r7INIwG+RHM26J0QTK8I6SyamWm3D19VOR6fkVqCfFXmoaTsXSyUgaH\r\nlBAsrdj/GynZnEBTNA7LaROswNL+TTb+fscH4uqkLLj6aHMG6D/KvL3WnWcc\r\n9Vo7X1Oar00Yk/zhKheLZrjn1TYzqeYS30UDXGcBxT/dKpu7yjvptn/Jkz5V\r\nFTDS3IslHVVW7jNgrry70kP6Pc8Uk6cm6lmTx1vkWkTaL2AC0vBuYp01ByCd\r\nPBPr/OBUY16/uF/uBDftxPN9V2Qq4bvxfYdcAAa5IqYrQV/jY2lRywEd1iIs\r\nsBH1MGZJcgzcTChzhdCEw5oFGmF5tt+H/0o=\r\n=jw8X\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"dd9be0f790095ebc62a3de5b5f33543ff3c55cf3","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model.","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.10.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-dd9be0f790095ebc62a3de5b5f33543ff3c55cf3_1667380265312_0.3127796180096134","host":"s3://npm-registry-packages"}},"0.0.0-next-10815be8fd57f3bfd89d061e1592eb7136d4a0fb":{"name":"mongodb-index-model","version":"0.0.0-next-10815be8fd57f3bfd89d061e1592eb7136d4a0fb","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-10815be8fd57f3bfd89d061e1592eb7136d4a0fb","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"081c81f116aaee80aacfdd3e9c02242b3f30e60e","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-10815be8fd57f3bfd89d061e1592eb7136d4a0fb.tgz","fileCount":9,"integrity":"sha512-+FyREnfjYtOkkH9bPT+Q4TDJqwNGvkn+Nh1v3A4I/cYSFUElVYlTkbBR4hhAfO0De88+vvvAaqNqFP7gx57K7A==","signatures":[{"sig":"MEUCIQCJwgL+TFfgyRQZchHXF3ckTCxIwqy4AJ/+hzvpLmI22AIgXEfrPr8qv3cFUEfCaFOwvWwY0PCT+GA6icva6tbNrLs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjYlTlACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqr7w/9H40lPOG3hWL8FwOv1tL4dZgSQKV3t46guoHjoWitXbkQZA3g\r\nCmNmv6gN3ixJDub0KHT8au7y0OYeAdZ+3VQ5AM2XFMIPdl84x+zVB3ewJ+uT\r\nnUdG4g4x4PRGO/8S6BhMmId45r8iXajpq4m0QAl4QVe+MjUVvmolK8lWHvw9\r\n5PLRKpSPo68fepAE2djbaBuIFwPXfdGdBEXW1Jmth3bQPqWDyeGdO947KfFz\r\ndcvKJNwnc7eL8x9+HP4IP9toxgPX2Rn0K26UC5BQ5q8CVJd4ZsP1jjsYa81W\r\nldrCvHCNb88NbhSwXaIGnHc2/lRieOao+7fyWiC7QGdDY/Iyi6jcmruT7Z1y\r\nvVKXsZeFrxK4M4MTL02yeM9dHiom1XmF+zsU6qxdfRuNHcKeal3uKUvra+LD\r\nVfYDj8hYFyHCAhPIKaFnysROV+qvTfKLPL70aF3VErEOqxG7KeUSqKHKDpBU\r\nYLTmDzt9gxz/It+jgcmKtsxug8UUllszgfGx4b6ITuhoO8fV9Rl+X5GOZ6oo\r\nJ5gKMZkuV0u99yW4XcF5dDqDW/FXjl9wfeM6SuVqZcEltk3sO0/7XytSbMWv\r\ncfl/ChI9+Mr7v04XMME77A99rPKH2jutO1MAmUx/2dFtHOaIgbnGV9uN1xal\r\nfu2QRMGQNaW0k2TB5FBLJ4RQcJDq2gGEs8c=\r\n=/+pt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"10815be8fd57f3bfd89d061e1592eb7136d4a0fb","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model.","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.10.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-10815be8fd57f3bfd89d061e1592eb7136d4a0fb_1667388644859_0.3576930321391316","host":"s3://npm-registry-packages"}},"0.0.0-next-59e1f6f134da2a3417bd69a71c7788320608ee5d":{"name":"mongodb-index-model","version":"0.0.0-next-59e1f6f134da2a3417bd69a71c7788320608ee5d","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-59e1f6f134da2a3417bd69a71c7788320608ee5d","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"debad59a3732ad64c0ea7026971939af56bffabc","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-59e1f6f134da2a3417bd69a71c7788320608ee5d.tgz","fileCount":9,"integrity":"sha512-vugxGzs2W4bXgvrI4zToVXHtTdd6Fzche/L3F9z1SXccvWB6JdXRXAjTaxpRaYeA5clZ1pO8IqhE03LMKUzy9g==","signatures":[{"sig":"MEUCIQCIvVqFVkd+h47Am2UEsuG/VVC0e1jcHvj6V6w/Q+68XwIgXs2n68FjgaQuQRmef7qSZQ/dO+5gYRpmuDh6wDgKRjo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjZIKLACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmroaBAAj+WHeP4biTIanIsnszbFtNTYKVT+NYlHgdALTGDph2E8dg5k\r\nRZssHC6rkemr1b7jZrBIS0zJ0sMuMBLh4jURHNQJwI3HrlhROCsO3pngZoKK\r\n+xwaWalpQBULyFUYxivvrf36UXzj73xeNc8kb44hE/xx0kUz4t8+/mWBQMDM\r\n3irn60pNqE2WGq8p8oYZzR9PoqcYrc0kSx63bIl7GnLYw48BEYaprE1I2S8K\r\nkJuAvDQa/2q7y1VGuRgUzi2NCzclZKEC7JAm38VjPCvkrWj3OzBW/sUMgZmw\r\nc1/VL6TNIYvrwQl4uDG69hDR/pPBpsrsfxjxjjIQF5eISmovA9rUxqRarW/n\r\nSWEhQzqOAiMLvnYHxF2m5efsKZlvkslZf6jhHjVvPtuhnzrI/hAVKPiPgwYM\r\n9xiMg/R8xWhDM/ORNXE9R2ChU7jzZN5w3Sez8aLeSK1dYouUvm5CJDVzgD4R\r\n6vHjGgISgSsrvgsui2AD2HJFJD1EMjJcLu2LR2UVOuIk/u3Oo2i+ft+sGV2f\r\n53xcohbGZVvjXnab1Lc5PAZpafDTeZS9JZgqI1mg2SYbVQ6RcGO2D9f1RZFn\r\n3d5oy5ZZa/clttlB8xrcaVxEUHWZz6EIn2o3wCKaL9NJBEesEUeT1VmZJcMH\r\nKcREbZoWfdPwg9rKYgc/coeJHaQsjeUcOLU=\r\n=9jvA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"59e1f6f134da2a3417bd69a71c7788320608ee5d","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model.","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.10.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-59e1f6f134da2a3417bd69a71c7788320608ee5d_1667531403272_0.3444283324812878","host":"s3://npm-registry-packages"}},"0.0.0-next-ea4f317e964c0504e54c01d83c385280a9135bba":{"name":"mongodb-index-model","version":"0.0.0-next-ea4f317e964c0504e54c01d83c385280a9135bba","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-ea4f317e964c0504e54c01d83c385280a9135bba","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"ec5d5a78f2de2a80da5351d4a5ac9d69aeb9d0d0","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-ea4f317e964c0504e54c01d83c385280a9135bba.tgz","fileCount":9,"integrity":"sha512-mMZ/y38pW6zTGGjo3S1JIIPXFvFfhL13ENZkgIx+MldvuZjvFbFuLvd2y2us7ahEJMKOuQfTfxlTh22s5eiwyQ==","signatures":[{"sig":"MEUCICcg2+mAkYNJ0YntpsX35o/DRZCVzhfN7QGApjBCIOfsAiEApbB7/5BCyIqQCCmXo/q1sW9UE07eavZAlC44WvENskY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjZIRzACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpRtRAAiy3qyyDCC7qntQPkuOAU/OcfN79DAsS59OmR5WO6GI0v4G2x\r\nDUhqLMw+oylfNesuJA1pv5kY5ukEqm71FRJgIW5Cufvue/cPS7+U1NkeqSm4\r\ntNy+W+qCszSfozr6Z3lJUyYfwR7FmueuN1DHmCafC9RAJqAj/dVpC2h/ia5V\r\n4XjtNonqYC+Ulxi3GBrSkMpAiK6QMqEKkNQJpTEZkBMiR+OGj2sn7EQcQ8x8\r\nOoBk9XIJ00UyowiDMWAs5X1iZJyeMst0lHfF9ghosPhIj+tWc3bDJlM8mqI4\r\nLeY363l4ZyJ3z04Dqhiw7k3Wci21s17Jd+IqGJi1GPujlqDN4ZprbZqYKkqw\r\nzH5d3qR3YAHH2ucBnTNNI8GDg1XMtDMX7Z6a95XqNvswGas2duz4aLBbEsa7\r\nnqg3MabXjv0OujjjKPiiZY7z+AHOOCBx5PqdhcMH/BGZdwCieBLtHumAL2Qm\r\nBd6NRP6R9xXRZEAvXGy4GfDrbZ91Jox3DyqL8a5Y+4INtD7WnbAQL0j6H+S4\r\nCsvnRDoUERZKr7aoW8A4ADayoEAyCeu2mcamKhU7mNmAxq2elufRls1KT6Vw\r\n7yMBX1aqq18bearDcFhIUOuEY2Z5PrKU664OTF3O96DIgSKocLn4ZA6244Bh\r\nKdso0/+A/pm+015FTRQ1NvVLtUrH75v63sU=\r\n=JS2N\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"ea4f317e964c0504e54c01d83c385280a9135bba","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model.","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.10.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-ea4f317e964c0504e54c01d83c385280a9135bba_1667531891097_0.300505241251692","host":"s3://npm-registry-packages"}},"0.0.0-next-bfa0f33f79b0349abe5ad03576e17682f507fe04":{"name":"mongodb-index-model","version":"0.0.0-next-bfa0f33f79b0349abe5ad03576e17682f507fe04","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-bfa0f33f79b0349abe5ad03576e17682f507fe04","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"9ae4dce4df5c5f1df0ff81ad756b604479022bcd","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-bfa0f33f79b0349abe5ad03576e17682f507fe04.tgz","fileCount":9,"integrity":"sha512-sya7chlfHZaQDabl+7RZ/vf+EODOhV9AZ6FFJdQGmVaq4gamP+MBZXoVSuzB9zlQDZnNIh91IbNB/YnsvfV5UA==","signatures":[{"sig":"MEYCIQC6iyZXdIWrcdOqj2HRNsaSqfiiMmyyAsqJFFBDTN3oqwIhAPcfWm16IYz/Uxe2CIQypg831ShAJjdi+K5JXUexmbw+","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjasm0ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq99Q//cMy/CIsy4RJ6ktB/ymYouUbzAeWp2h7YFoA8PM5KILAGUQq/\r\ncGPVdDHYBEpy17yObiugi/hnFIBHqNas23ixGkfaTnws8Vs74S6TwBcebZfI\r\n0oIjnUNFcMaEFYb9cG/D0BF4PpK9IsCmDCKPPFAU7Lrisg7WSN6tjgR8wMaw\r\nknclwMY4DY8fh+Xt/txyAHAVcSzPrsv2VkcV/kG4Am5lUea3VSPTtygSk0EQ\r\ntm65dklPHR3HxSIu4/eXt3AwU9cwasEic5xdZuoOebQqyjPJSemO1LRqEbvw\r\n/uT35PKJO3416tGu9u5JYo1gb0W/7obQQ+EThL1FvVNnklXlCJyWEhgbqIac\r\nfs/L7tMXSISkSZd8G1K8yiqVkwpQDEvz/0eGnFN09Yi8g/7t9cTEuRXC8Zrk\r\nSzl6601OwHzlXeghubGd7J7chfIWuna55EXw7RC7fD82iUf6TLYwo7JuNPo2\r\nDF4XaMqCX+6YFL7oXAOeEJHqYfUafmW1YAh+SM4jm0GOhNHEjF2SGl7aqqrQ\r\nSO1fssNm07B6NihiAe5bvAuo6fLCJnMHaIJV4dpEs6yxR0Cyvn+OQo+oBnYC\r\nrv2tG7p2X0DeiSX9NeuHUA9p8KLu5+jdVAHRHmm4V+pnyztQCWIghHnb0jAc\r\nHbzNC4rOHNsir2dBcDFc0lpEetCsy1748TE=\r\n=Yowf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"bfa0f33f79b0349abe5ad03576e17682f507fe04","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model.","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.10.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-bfa0f33f79b0349abe5ad03576e17682f507fe04_1667942836277_0.8388776852868138","host":"s3://npm-registry-packages"}},"0.0.0-next-5f5cecf01c890c348e17907482b03cea2f8c5f21":{"name":"mongodb-index-model","version":"0.0.0-next-5f5cecf01c890c348e17907482b03cea2f8c5f21","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-5f5cecf01c890c348e17907482b03cea2f8c5f21","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"9dbf35279d2f09700bb9bf9eb0a80660bfd7f1b1","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-5f5cecf01c890c348e17907482b03cea2f8c5f21.tgz","fileCount":9,"integrity":"sha512-QS8fqEfqNP4Q2+b06jTDN7AJylIPYwL5UWuHlQHLQ1oS2dpzyRsDJZanBBcg/9XPgYmVneKn9nfUYKnH5auNQQ==","signatures":[{"sig":"MEYCIQD8eobgdEpnGPqbDCOLkEQLwxXzbSGg5U/IeMND7S8wBwIhALYH1pJZG3c54c1RS6yyDXXEtpFA4yM36GTEqH3gT4ch","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjbDtYACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqEJw/+Nm3735xkDL3V+zTGtru0V5FhB3A9Tw1cyn9TVLMVRK7fPd3n\r\n4BJaLeOGDPnRM/9V5k0yDcmIrAX9TD9ifyRFgJvEtcyeVXSWPqx8J6UZmvKy\r\n19QNbwFgB961Xrn5gDX19MiCy6PuxCZZWaxve+F0dU1x7aSJ3yTqs6nZlZYW\r\n7jerUP+eFT4xe6ZkemBSs/fDotBrG6QTA0UHkSROGqHrv6dyuDCQKZil6vCb\r\nGyzh328azOgH5YHSMU2t/vQDCEhnz7S/GuhD77k+XF2zm+7uhpliGWStrJ0o\r\nacfx1P2BaY7C8q1kdw+b1rx6bMsWfedPqo4JLryVQSc4EWwsXAB71Fo4Z++I\r\n20UccJ+pmLsngXicI2UYcb5Rxdr1+6QL1Sr/IxnGqKnw3MXtWk5dESQGQs+w\r\n6tA7S+aMFPhW3jZK3NOGeTwQpc+DkoRmMquLayQBATcmJ/1ykKgsszX22Tv/\r\n9PFd9crm1h7/sLzkPUzxipni7WNDYR8WVO5YuLzTXJ85oIs/fe8tGE9+zSsv\r\nMsAVUdJB0/lalEzJcpBf6TB130fWMWRrMM709Xo41/F+X1seTgI15DOIkSCQ\r\nUBT72YWHtIpO/80AZ+jJZBO8PbUqoKhIMBpeATWrRe13+PlYHaE5wh/UejMD\r\n4z6Q26Re5BNQDZwT5WptfzQ0lxvYOZSGwos=\r\n=JyZU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"5f5cecf01c890c348e17907482b03cea2f8c5f21","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model.","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.10.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-5f5cecf01c890c348e17907482b03cea2f8c5f21_1668037464493_0.6780905785129505","host":"s3://npm-registry-packages"}},"0.0.0-next-51a8e00f16dc1652cb0f0674c540570614a8895e":{"name":"mongodb-index-model","version":"0.0.0-next-51a8e00f16dc1652cb0f0674c540570614a8895e","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-51a8e00f16dc1652cb0f0674c540570614a8895e","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"4a738829441229f9afec3190369fe68ec0265d1e","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-51a8e00f16dc1652cb0f0674c540570614a8895e.tgz","fileCount":9,"integrity":"sha512-tk2P5tL5XYuwPoR9nlQeUiNPdXgS+V2+U8h8xqrVccmIQLH0fnWiOXvBLMPBK1mQcgFND6X8OrFAcDMtKi6dqw==","signatures":[{"sig":"MEQCIDML5FbEJOUNkFvdcbT8qMiUPUQK4h5jX1cn9z7C4H0aAiBB73NZZrjGaMZsb98BHHrNxegsAZoBiG/ikBWC31MDrQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjbDyyACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo1Ww//X/uEvtue8AFd26JVTdbN3Fohcu+aFVQHFVjDphUMut+D1xWn\r\nBg6oOSh5h0ywJKAryiUSLRZvnotud2SMLe4/dZfVM7JWBlTImnT1gRAkp6B1\r\nwABrVcVzl+nul1gZfqDqSoy19ma7ezK8YshqeEWeWdGfk0FlY1J8sHsC08oz\r\n4/bA7o2RsYRIyYzu6AMGTCw96PpmFpgapjJL3+nhvxsWlR6Jbk8mb4qnKBQ3\r\nZgrA+zRVAaZtzW9ic2t9mifRgHRAhhOrKdAp9/d17hMx4M2CtWtM9DWX2qV4\r\niGobjLi+pyuicv1XnbClBbkj2bRVlEpf54e3fd2WUJLC97IMU8Hrj9MK/44T\r\nreJIBaub9v+BuE8wC2/NzrX9J+tM2IcGVNlfhEWvqj5xktVhQ0tX+dir6qje\r\nGuxumg/JvGqDagcwYtbTHU3RRWzBQun3zbFoFuI62xDaZfmr6ZonWPenjtkZ\r\ntLt5FlruLTkgYLwEi4KBdI0ZFNP9mqtE5yho001+O/7ttXdBy+SwWap68u/X\r\nBszCRgKJrmk3XM/QBgt9c8ykSeNRxRTk9fuxcA8iLE26fU1V/ULETHLMJz8q\r\n4ZVSWmE90MmKqtgpllfhY/glLS34QgC7tn9SNJvl4HdDs356aE2mRN1bp8Xd\r\nJ7Xq4t+LL1yMHu6EmpSM4+5j4aAKpPksRXA=\r\n=YAhY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"51a8e00f16dc1652cb0f0674c540570614a8895e","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model.","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.10.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-51a8e00f16dc1652cb0f0674c540570614a8895e_1668037810140_0.721498858952206","host":"s3://npm-registry-packages"}},"0.0.0-next-6d1491390706ac21857752412a5e4d10e112a29a":{"name":"mongodb-index-model","version":"0.0.0-next-6d1491390706ac21857752412a5e4d10e112a29a","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-6d1491390706ac21857752412a5e4d10e112a29a","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"7fa95c7b8c6fe756b2262820106642d5e61782bc","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-6d1491390706ac21857752412a5e4d10e112a29a.tgz","fileCount":9,"integrity":"sha512-evKzsIIX53h4nwncyo2FaIu22twic1BlcAabMbYMpZqjBBzUxaaBrUE4HCrvgSmqfDtbH9xtTGJ7BcxBmTL6/A==","signatures":[{"sig":"MEYCIQDNm8N67UGZ0cdt9bYHV6smiQG4xSMsJN3zVsOyAPg1kgIhAMfZrJQu5WKgJ9IaGZ5V7WRdeEjC8458p6o/4jkm4rRU","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjbD2wACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqOqQ//U8QnGCEhlIW3JIkZvtvDYy8MtoeL9h5b9yqqJ2etoNZRl1ou\r\n8aTPkR1po+JvmtGRi+dFu6EkOYnAFaTnzGm6yyouTwGZ54+zDDQ0fzAT1S1E\r\nQGH1eloUB5ofrNg+7BDKevF0aDuiZMQ47+LwQwoayVADkNoJo3A8tO3F8cjg\r\n/ObmyZOfXHyesw6IRnfv0scLScHq66Xco09Qc6p3n4BaKXHrNCVz1rzjKcX1\r\n0Vyfxu2q2N4ysJgCUGxq5q8CR86WryZNnN5rLOBe+64TDmrwhzYknaW6UwoM\r\nLHmyVCRLENXcpR6OKdcnk5bqYXAWE6mHV26WeoED7IlK+UXj4iOkozRsVpuM\r\nUXdr3UIiqi0I/xjn9ve88PIXS0AKn2QEelNjXDOdM4aMPNtaSjYO2TCbzl/5\r\n+12zp67RfHX46aMKZhPqgFIXVKF+ZXZ3/QAHaTZRVWsqq2NgRV2kS8fKUsjR\r\nkq61NAT8mgBwAMq6hkSOp07kYo+WD+toD7QuZynKVqb85CzKGfcqVbUV5grj\r\nKnRI745BPYxdkke1y7fEp5rNdDsvdSZ4Ol17w1ONeSuf6fF6GFsHuJBYxqfy\r\n+JOf+e1dUh8EWgc1Fc8TWhveONZ9UX+zLS8HtLtGaaour1KImp7T23itwwVJ\r\nDt43Ca51knB0KDfb0UyKsjGS5pDYYibMVr4=\r\n=yIv6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"6d1491390706ac21857752412a5e4d10e112a29a","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model.","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.10.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-6d1491390706ac21857752412a5e4d10e112a29a_1668038064186_0.07323956686887523","host":"s3://npm-registry-packages"}},"0.0.0-next-44318443f2cd1088082181789b25fc26a7a11bb2":{"name":"mongodb-index-model","version":"0.0.0-next-44318443f2cd1088082181789b25fc26a7a11bb2","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-44318443f2cd1088082181789b25fc26a7a11bb2","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"3b4f0f5208b9320b6d2e6dde0a35a9837bfa6702","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-44318443f2cd1088082181789b25fc26a7a11bb2.tgz","fileCount":9,"integrity":"sha512-47c08vKRfp53+1vlDxblx9h0PagNdYA6PaUPGW0z8nseW6S+RlZDn3ODu4IPwrhn1Sg8SH0LxM+EWc43F99ihg==","signatures":[{"sig":"MEYCIQD5w22vO2yeLy+zTxDuRdm9cBTA8xXFUPTHWtD12E5MOAIhAJpSgUW8ApXpBQ6cZUjZSzAV+SUyNPmz98q0fJZsvjTc","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjbD4TACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoDVQ/5AP/8DKlC98lJEMvOGJ+2qv6UoonyVUvY2nt5sY55wIxeMxn5\r\nFkq+etuzZA+OAtbFMOnOoYpnKq/UibG4iYH33hRP7XnKuV0DrAykBei6uQSt\r\nvojSkgOHO2JCEWf3KtCU0ArD88B9SmnQpW5+m2vOm899gQ2sqTapdt6xzYyB\r\n7zywjT3/0YeIsBs+ZWWrd9NghvTwoEDN1Bm9hnbZCBwstjf6HYYIzs07sFBj\r\nATtJgjPrY3a3cNBG2onLU51yk+cjFAgGJhDicFsJVArOX7wJJ/hAeF6ofsvq\r\nqeNlgfngi0kqqqHHko1zeHn7psZe8yCdPXIpKObb6U3kJGeaMt5z9QWbII/6\r\nGbqmJnd7gzM4xEZupMIXtB7eMaVHeJ/4+M8D4x0BdDF4CDdeVULTC1CGzatK\r\nSy24TIGoL/rfzaxYvb1Pd08APCcraRR2t3gyjWcSYvA/adB9SHRAg1OE5Asw\r\nIM/Vp6O0s/GjvncmrmwzNgKSveUAobRIUAPvpWARbHMg19BqlI8gWbVlYdLx\r\nqdStNy1B4TaUDnktKM02mInSHHknsjRIpUlFEieQ5PfjK5S1gBxdVkIPQfJf\r\nYISyqMm/L13w7/KfLtLj4CrhnhYcL/R4LUYcBexV6V2jaB71swYBbDxqB/eO\r\n3ahNiB9TbA9zuwd6M8lfofWYgVTdAEnIEgg=\r\n=o+yu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"44318443f2cd1088082181789b25fc26a7a11bb2","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model.","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.10.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-44318443f2cd1088082181789b25fc26a7a11bb2_1668038163601_0.36672278230522815","host":"s3://npm-registry-packages"}},"0.0.0-next-3b50f8232d3349fe79554f36417d7fbb45b6352a":{"name":"mongodb-index-model","version":"0.0.0-next-3b50f8232d3349fe79554f36417d7fbb45b6352a","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-3b50f8232d3349fe79554f36417d7fbb45b6352a","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"4fc0662497d8696714597e4a7af7a880ecc6035c","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-3b50f8232d3349fe79554f36417d7fbb45b6352a.tgz","fileCount":9,"integrity":"sha512-DMqAUeIk9cjjMFIzH1QNKH/4+9FEW54eJc8Fil8MliAEskGXJQJVuxrOnwM3pR3Ti2sIfDdNasw7+ELNH5o3LA==","signatures":[{"sig":"MEUCID1OAzuchA2X35KlmutfKrA2MShJ13f/aJARzvHhEcpPAiEAn5bLi9BHqaoMTvnTBZVmASNm/O53XshhyI25/O3P+lM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjbD8aACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo7Hw//dh8Hk3aGksMGPCsVC7fNY4F+YdOBOgvNl7Kv1PndG6oaUd6R\r\nQ6fPjlEV4gRDsdjP+o/Ggf+ALh19LABeeByzmdlQE3WyJgErfSO9XDJHXeot\r\nGtrNJFOAojRFmPGHAtcMFrooA9eyWEc4suJRw/WWU9rLancNYPM8olHYA26r\r\ntEXlHk5Q85zBV0lNMjQOWfEY7KaTnZ42L/TSJ7vBPaCS6fAdseiGFpxnBQFh\r\n4eDlx7E7poUmON+EANSE8xUcxACujH9BqyBZWiJixyvFSSOQzu1jFQbkqtBk\r\nE6Ogf89xObqEAmz8YUbs3IY4Gh/kakxfXaQYRY5klwk1gPD+/OVan/H/eBjF\r\n9Xezi0s8ZMssF4JxUZ/02W3uviWk0IjOuGxF0K+k91/NO66r7kWHitxmYqVz\r\nnS+Ytaec4yvQ3DeC1aQlLgBv0t/MMvOetXa9xrYLAgLSLxNqn6LNesanBj13\r\norca2lJsrUDgFDly/lzuKMw074UvC2RUkhxXv1XPFzKfkukvDQFQ1ON1wgg6\r\n+Fl+B66ehV5+NXKdHOZJcy6WGbyUlnNRmuZ1mibKbifXcbLwRClQ+g/YzUAL\r\n5Wh+TaTCaahkXLbR7ryctRqV0vhKEaRJ/JcRw7MBlAELlv5y2LsBDvhd8zpE\r\n668//KGeog5e/8xOD1Zx9kBeo1Ki2HFHTFw=\r\n=wLUq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"3b50f8232d3349fe79554f36417d7fbb45b6352a","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model.","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.10.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-3b50f8232d3349fe79554f36417d7fbb45b6352a_1668038425918_0.2669782644636183","host":"s3://npm-registry-packages"}},"0.0.0-next-47b085701d7c0b212b54bcac46f6106d34ec429e":{"name":"mongodb-index-model","version":"0.0.0-next-47b085701d7c0b212b54bcac46f6106d34ec429e","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-47b085701d7c0b212b54bcac46f6106d34ec429e","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"0253e1f9c8c6dec49eb9a56aea0393562f2c8b84","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-47b085701d7c0b212b54bcac46f6106d34ec429e.tgz","fileCount":9,"integrity":"sha512-8RRmRKbIiYz4Qsm0H2rbW29TRQPZnupF/ky6IFlhOn9wWV+kliXDrgwqKBGV6owtNlYMAvbqfYxs08qHZFeEhg==","signatures":[{"sig":"MEUCICf/b0cLLf31uO9ggCfsvXWrOGmkkP77GwQV8wZan//3AiEAyRUfi7GTDMewpnm5VHn+WP8tz3WcGyMHNGtccqkG7G4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjbPKFACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpuaA//QK7w9X9kK2fBxXyXkQ/WUTVSPGLFm6uf4G5qQxXFRXWed+fS\r\ndb89Zux1RNPHJY75vkulXa4NWa4NcpQPpOUIxvLjtP4ZZm91fnO7SarSMVLX\r\nAX3vCnBr8P1wMl9fCPUSsNBeVR+Iw9V9oZa2MP857z3pxMtzRRBqMEEN4ulM\r\nCoQgv5S0F9dsEVezmnZzZ/hVilgs9M0rRfWfqEcpBaMfJxWVLLVFSZI47CkL\r\nhQbVVdb4+U5IAcZrfI5kK9DAH1jKObfWQPQvLMMNjHpbCGkGGchkkyo7JCwP\r\nUaNGw9N9do6tlIbVSWsa+sgf2CAxkVPJiTBwlgTPlmpJkjrPJZ7gE43qTzeR\r\nJYV7OZePDhb1QrTgPG39hJRXR0v/GsYUGp9nZlGNJXn0TWz5JWPFo/6bZfnS\r\na53qEBH4YTSsSj/9tm19RnXugPET5IdoIxx9dSVKjFjHabXbbHL5zb04BnV3\r\nx+qMyipj2WyLJnAuLGiLliJJb0B6HbmwFS4+0vamid0fhSOgaU0IYntE4iw4\r\njYVFzEEvP2Cpr3ZvYS71C334KKnYD7avhPT7qCG28iYJUqx1AHUYurzdwXFC\r\nk+luMQvsYHUDG8/WH/dsGzeiw+yPXWYcLm5FdEQPyceB3hdbZeJFo83Pb8t7\r\n2cYOsQZu7bQEbI3AmrqW+uQiJLJomc9DUtE=\r\n=LwUK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"47b085701d7c0b212b54bcac46f6106d34ec429e","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model.","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.10.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-47b085701d7c0b212b54bcac46f6106d34ec429e_1668084356855_0.6705387157173528","host":"s3://npm-registry-packages"}},"0.0.0-next-9e3b266e199e346a30e2c20aac373d48c2ea9888":{"name":"mongodb-index-model","version":"0.0.0-next-9e3b266e199e346a30e2c20aac373d48c2ea9888","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-9e3b266e199e346a30e2c20aac373d48c2ea9888","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"2d680ff58fa1a7a4ec50f660c86f06179e1e8663","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-9e3b266e199e346a30e2c20aac373d48c2ea9888.tgz","fileCount":9,"integrity":"sha512-M3sjY/TxMeJqZRsXf92+xoZdDVN0sB+Hpcy5+P+g2EPCc37b0F/PGyd1FA0PmGjKEaOvGBeTYpMF92mv1enF9Q==","signatures":[{"sig":"MEQCIDnUGALYAjzj5Rr6RUNXR9qv8Fxa7O65l83J5jPBMMevAiALOLMdWxxjAX5keNZMnUd1UYNBLG3JPxmFixl7fwJ8HQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjbrP3ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrROxAAhIcU968fIKaCveYkJ39Z0PMp9dL3HvWRANxa4l/onh4gZTd+\r\nXcFpvQA01HHU04QHKAD3G+PzLhi67CIiEypRhZWSF+xaaN9pyFgodgPXeQvI\r\nhiQA2ZAtDcaazyH/2w3yiAVOoNAxkEQWdy5T7s9Up6hi4xgsc02Gy8aMgqrn\r\nc7Kcg01YfRnWf32SHAL+/CPDOV7Lq6v9vK5bnfTuduYFPSValdhz/Dq4Yd4R\r\navJiC8YkUYjoPc27sRntAZtbFOGWL6bAtJFm2woCN1DtyO+wC7wgA+GMVyGx\r\nfJ7HO7V3iBAfwBKJZ5B+fGB/2vl0nJO2CyNePhrd+IrWdOgK4rRJBaxSrUit\r\ntovqAIbKHbdUKHm0bhp0p45p6NgVjgiIC2yMfryXHyjr6BRc/PPHziHrYbR/\r\nZX84c8SyGQNoYn8LPprbyIphiiTVgzxYCz2jC2rdebyNme+lBrpNCX/lQw9e\r\nSc4DEM88s+1Eyy19Ex1r0Y7XonV9dcisyeGIyzvWpvfpJQ+hLwtR/JwSYHW7\r\nEAPrqkffDB6w5WJTukraUTNvQbP+ywHnrstiUDoNoxw324qW67ShIJMHakvG\r\nlad7O8R20WgvfAtwvIHHQJxDGMx2CGCbPfFL6bG8biMH1Gof7etAlPbLyY6T\r\nahNcFip/I3DVw6PumQc8S6bH0m4OfycW1bA=\r\n=rxYs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"9e3b266e199e346a30e2c20aac373d48c2ea9888","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model.","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.10.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-9e3b266e199e346a30e2c20aac373d48c2ea9888_1668199415494_0.3913495834370382","host":"s3://npm-registry-packages"}},"0.0.0-next-91daa029e219b08cf0b775b6648d35867f2272d0":{"name":"mongodb-index-model","version":"0.0.0-next-91daa029e219b08cf0b775b6648d35867f2272d0","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-91daa029e219b08cf0b775b6648d35867f2272d0","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"87769c108b4cdc974f81de5ab3b5adbd0f149941","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-91daa029e219b08cf0b775b6648d35867f2272d0.tgz","fileCount":9,"integrity":"sha512-I9+wJL6F2Ff6ed16IL/TvmAlpBJGA7A2ZOrmuqwT8/o7dWb7ijktWgCY/kJE23YwEbFBN+xuQI1m9Sw2LK7sMQ==","signatures":[{"sig":"MEUCIHrvSq8qSACIkdj9UwAxZIV5c3pTYtBWfvF4OqYxnC+TAiEAnsUgFN+q2NwvrGq/Z9DqvQcA38IyJLz8EAX/M1vFFUY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjdW5eACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrSsw//b6CgEC1FZ1PpyoutMNbyEPVrR2GmoVc8dfCb56XZMvn1MZK1\r\nBzbWJi0ZHxAeUDBJtYK6utXdzWbhY42SYU0fkuwfF3EHXRD4T2P5Ko1NTAAf\r\nG+WPPnu4YEYQWpX/AIlcl2s7CMsOehTRTthaPB7AIG6PfjcxO/ouwZuC3qsz\r\ndQ3OOA1GbRzxJG8w21TV68RJRuvm5QOPC4zuWzO/ZfPoS1UI7/fnVCXJe6Jl\r\n3JiUeWaDHq5C6nQaOnxQB26y1lqP05yrjpnJoYCrD4CSko7KUfo8N29//HA1\r\nfHBfzJu6FotTlOw4zBLheUezy8ECmkqCVTFxE1xN2b3v6AcCt0daue9wwfYR\r\nkaLeifIqY0yTzhWGRELmfHkOPZSXd5a6HspOhVmwYx87PmPl/1u0xzK3zqqK\r\nQHdvmgwzEUlJAlsAzjMNQgcCogilWu74kNz+KoSwpxLI7WcZ7EynMOIC+GaA\r\nnbnewXTSA5CKbXDRCLmMqi3McsQdBbltxn52ZZe1c7Ie9S86f4qI0Ko+Bv4A\r\nBI75z1DlOd77EMNd42Ttnohp8sjh+GEWL8CgJ9L2TWZTvB4lglJOdtsPqHUE\r\nvVWZri3o9GjNC3MGljGb0OmjhzhnhXE9E52TPImhd/G0/zDk9I5zWoKmwRKp\r\nZ4+s83OIFo4Vp5OAtuWvgChNa8KELf+Gzqk=\r\n=6mlH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"91daa029e219b08cf0b775b6648d35867f2272d0","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model.","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.10.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-91daa029e219b08cf0b775b6648d35867f2272d0_1668640350614_0.8402780563575851","host":"s3://npm-registry-packages"}},"0.0.0-next-6aa8b22a0d621a03baf14775bda36ea4cee48a38":{"name":"mongodb-index-model","version":"0.0.0-next-6aa8b22a0d621a03baf14775bda36ea4cee48a38","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-6aa8b22a0d621a03baf14775bda36ea4cee48a38","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"dafc37bc0775764002aa9b7fc20705d1134b15b6","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-6aa8b22a0d621a03baf14775bda36ea4cee48a38.tgz","fileCount":9,"integrity":"sha512-aSAcd8Dr3PVNkOBwew6ULLKW86GcgGQgE338UxZD7mqC/FvG2PRpa5x84KPQeNYiUnBExiCCL+DVf+h1Am+59Q==","signatures":[{"sig":"MEQCIAPqRH/tX19rQuSXoH0gEyWoicoYt2h3/UDk9XyyMphwAiBlh+ZAqhltSj2g5DWW3bEHKtXDaRe1PqcqTMHkt39weg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjdZjHACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmphXhAAm5LCE5lH6xRsOBtKfHf9EPuTD9jDxbusA9mQX/wOt4wbSPmv\r\n6/v+FgBuELQJARb+sa0bSrvbRiUlLyy/UCNiXfC656TpjCj4adJWO1AwWX1o\r\n0M3ugf2svG9m3UU2Jl9liVyin0N4WjXaBcNxpqI5hojy+IxtAD9YXMcDgGq2\r\niPmqi9C7FEmm/SkPYYyPWd6Bb3W/mW3QfzHT1g2/XVUBMJIa8cDZ9qXWdgV8\r\nVn4FTgNOxGD88gVGKnd4FMmuok2p7hLheb7xylmo1nfHnewDR8EM4y2zcOvd\r\nQ9WAGAzhAOtp9HwPIOnJ3HydpHk4ntJbcF+URImZ2uTlsVvNPSsFTFzErlVv\r\nPXmZCNRw4gGdmU+FVJLGBLOYiNmN2ko2553bij+Yv489W2Lg//bnfQjTqFUw\r\nuRSe0BA1p8F8Iq7cvzbT2yleFJOo8zVuxrEwblkmo7btGd3qbVbZBA3J+FQq\r\n2L8Ss3XCmmQ87cdPjkPXsQqKlFXkylfcORDDwwZm7WZe38wZnqcEA/TZvLF9\r\n6CdNhg0ItxWYemYmUm5k70y9HXE2k3dqJhF+vJdEYeX6o4cleToYZ8IHg0ym\r\n5FNJ8htkjdi/tJ7xUWxxdkTsIMi87mZ7qNa8+gSGpuoFgvIYK25u19crw2Kn\r\nvqXYX9yxj3F9+mFlsE9fzmhK9EGY1xhw6Vw=\r\n=/awk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"6aa8b22a0d621a03baf14775bda36ea4cee48a38","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model.","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.10.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-6aa8b22a0d621a03baf14775bda36ea4cee48a38_1668651207496_0.40462602523243185","host":"s3://npm-registry-packages"}},"0.0.0-next-f81cf38005a73bccb0db48296f267b5f55774b50":{"name":"mongodb-index-model","version":"0.0.0-next-f81cf38005a73bccb0db48296f267b5f55774b50","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-f81cf38005a73bccb0db48296f267b5f55774b50","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"dc76d9efabbae21c84fbdc59c5ca3cbacd4c4abc","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-f81cf38005a73bccb0db48296f267b5f55774b50.tgz","fileCount":9,"integrity":"sha512-dziwYrJsgFwuowiTCuvOVBwzQsmO3wCDIOyLEOfEb20Z9zvTe/jwzSFGg+LAEmArKq2WXCTnqyH27ubdH8NuEw==","signatures":[{"sig":"MEUCIAQS3gUawWQJp7mXMxzpxccdLCTK80DXTANPpzjnZtGZAiEAgd2G+0wvc+f1SM9XpGRJFyUgQB5JjhB9nJKn4Wk9QoM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjdZ37ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr/ZhAAhG58jMpXZ4bTLuQqH+sXrgVJ8HgkQVF54KgFsWqwi81b9F3P\r\nyWmoXCw7h5ASWaGzgk2VQnfSGfavN7NFS20QDUwOvPAlSqsxew6PsCrQXWHF\r\n0Ic2IyVb4OusXxsc06oYwE33ALX5lInUmjREUuyPN/hnAwNpVckI0r2y+aA9\r\nRz+zYUtlpGlMDKSlWAH5BURydpBYA0ujWWSVk0l22zs003+DK8wmv4/j6Usz\r\n/s6+FWXbV97agxZXksMm6xYQWHy7xIRx6XCXRXy/bNkSfxf1ImCViVNrWau+\r\nIXIdVjIcU9cZUh8qNCee/QXX4gYLS+4l2ujL0GyWZUqM/lHhh0bEoqjq1c5U\r\nZFbyOCvn2dtvDmLxoRLTlCTaN7us6bwZ3m2EGTmfu5mtSEXAaNpI8ENYjJnT\r\nOpv7yeNWlZPIlbHka/nuAw9F0tmhsZmT7B77azNWwPikn/29Kdm+MS//ib7E\r\no+TyFfJBfEZjSmrSYqz+0MLDrIgWqY7b/fFl0sTRx7bIU2Obs08n/LXzrQRU\r\n4UbGHonz+A4KhEAXpGFrxBrBhC1hycb22td4zpE5JChdQsWMS4+wJCePGu3M\r\nrdWnJcvneROyUundzNDzg9NVdqgZFWmQntRiRLd7tOwWE5m3oYHHlDSIclrB\r\nMP7lqPeuDM1sd1f5WA16NRGUXsBSZiAerqw=\r\n=lhhf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"f81cf38005a73bccb0db48296f267b5f55774b50","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model.","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.10.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-f81cf38005a73bccb0db48296f267b5f55774b50_1668652538850_0.009361035729038347","host":"s3://npm-registry-packages"}},"0.0.0-next-27bdd4c654b0108a364c4bb3541996722734028c":{"name":"mongodb-index-model","version":"0.0.0-next-27bdd4c654b0108a364c4bb3541996722734028c","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-27bdd4c654b0108a364c4bb3541996722734028c","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"5a23aaee2116bc379a66d56687adf06eedc0e452","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-27bdd4c654b0108a364c4bb3541996722734028c.tgz","fileCount":9,"integrity":"sha512-lpcXIuZkXdtH8TKB1W5LTKLatU1A91KGBoaicklGe5eSKJmgLyDWzjmJYZ+DP8vVsTaKkGv10TPJjyvYueOacw==","signatures":[{"sig":"MEUCIQDEQM/C7EQJRzjGtcmI7tRM3bhlvZBsVmDKjQ01AAw8QQIgMAWCq9RFJBIUuH1sPrhbxxC2kswL0PlhhCDk0CD0Vx4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjdZ8rACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqcpg//aIRHj4hz9YHBnVZpWlntebUZsUJEm7Nu9TnRfi8wlmsEcZJi\r\nWINZSXZ4ivfBRAy89RklHePrHUMwiIvLh87A5whO0vqFjFQ4Pix1ldMQ5l+B\r\nVvraAJbwYLbbDImzE6GzhVDzMNMQTPhDaaW07iPd2UI/6TQZTJIvDZo/ZLK1\r\n8Tgh51fslLGlDIqcQYrMW5XFKmD5GgZTvlKKAVAoyjqpSOtRMRKxoRx/g0rU\r\n51dWUxy0oB3EXvUY8b6MT7CI3yWn5dFb8pFwneqGHkgLgUILsjRfzCRvzUXa\r\nJiqN8vH0W8Z2YZVw+U6rb/nhvll8a7JhlkIS50lOPcGrT3Qmy1HQ56D29zSb\r\nAHjtOl1VHLxvdhjZzE5op91y+k59T17ogVUy1jyFiG4sMKenNYLUs6Za4EoY\r\nve02Zyox/KhPuiHE4obf1fcjN671iJ2D1rvF7dv7FP+bhKVyTI3+bhYtZXWJ\r\n/COmSTiiOM/vx64CByfBK78JdPqK4KOrd3S6tkyb5ncdgtdics7YyaZog/S2\r\nN2kSzguegKS/Pp/ySu5gm64Cif/pj0rJcWJqd5TxwI1SgzcWD4wSdE2uDEE1\r\nHSdQj7JRkkRSEV7NtBB5gsdJ5zwQU7D8I8hcZ3Wl9d8RZZCebR2+o4nGSUt8\r\nNz8vAk8roqwyAZd9cDuwIn3Gua6as2OI+vI=\r\n=Fxbq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"27bdd4c654b0108a364c4bb3541996722734028c","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model.","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.10.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-27bdd4c654b0108a364c4bb3541996722734028c_1668652842889_0.36677409267755734","host":"s3://npm-registry-packages"}},"0.0.0-next-7f1112246f97f222dc289edb7b9f0359d8f020cb":{"name":"mongodb-index-model","version":"0.0.0-next-7f1112246f97f222dc289edb7b9f0359d8f020cb","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-7f1112246f97f222dc289edb7b9f0359d8f020cb","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"28113eb1a16baea748305f5f46eb9b8c58e2a182","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-7f1112246f97f222dc289edb7b9f0359d8f020cb.tgz","fileCount":9,"integrity":"sha512-kCi77FnZMZrPgvcy6qkgw+QsFDlcwsChRr4rbCzpo44/PztRYHgdgwJfjePyr3meI2KCN+x0MxUYSmUodPkm3A==","signatures":[{"sig":"MEUCIG/f6QXG/JL5syjpfb0k8xr5fNPjLA3FQWxmR+sW4bwCAiEAkQD72Qwyl43sdHWsJ4VxgYDKJ1cVcfHmspxlatLQf/I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjdaFgACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq/2hAAoVZf62P7SeI0W65cgw41GOk/aMIESxAa+APtXULJpWFQ8HWZ\r\ndiLA3FSa7Nknr1Yq5Pqw3p7QIKqT8oJvPYaUsS6M+rQi3WhcJ6RumlqgJbg8\r\neDXguNyAF6PfrGWUgHe87hzgFQ+KmTGK62AcY7oqoC/ovaGgXHpFgwT6nNJu\r\nUlBhyHJnOHaYM5LdwGrrb7ERFeeewor6A1nTlJ5epyUWt82bkxVWZqhYBjfk\r\nRsypBdmdszNiPNmk1zoHPMIFhNBlHtX79DMeAbRRJ3RKjv1rxAcSPVqELdW+\r\ncd6d3I6H/YZr5vFiyE09i672lvmWo7S4cWPYqOwGrjBoVVLZ2bdFgvOY2L0V\r\nNGZGYSAt6mHy5UNGw23UTJmXQjwElwRFcC8acFRykK4txmCiAu0Jzyyolr3o\r\nB91w9ckMieNakkExJOUn1xvgfXs4uhzBfnaJojaZT6oXBe9Ij1dpmJJvKvbw\r\nSIGiCf2tDOe1EFcBuX2g/UBUP07GGHXWXwHQwjdZOqJn0y+v/pYp4hURaxsT\r\naddA3+xmqBEgm8DrHqBNrJas9gZxvP16hlX9c7IJWlllbQk7zeN/I2U3kBAS\r\nulOkNMGiWwRkqUagYifCQTCtddeco1ARWvAFTMbB8b7Ha9PHnF84TFu0mk1Y\r\nCHOmNYicBwzUanzInLP6cr4F/vchPhaZq6s=\r\n=ssCn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"7f1112246f97f222dc289edb7b9f0359d8f020cb","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model.","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.10.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-7f1112246f97f222dc289edb7b9f0359d8f020cb_1668653408771_0.2533850258774173","host":"s3://npm-registry-packages"}},"0.0.0-next-c12720c09369b6620405de027fa85d469db43e9c":{"name":"mongodb-index-model","version":"0.0.0-next-c12720c09369b6620405de027fa85d469db43e9c","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-c12720c09369b6620405de027fa85d469db43e9c","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"0fbdee624a6c4d57edc2887aae8fdd4b0ec2f5ae","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-c12720c09369b6620405de027fa85d469db43e9c.tgz","fileCount":9,"integrity":"sha512-wWgwNHla+Hif8gnDhxNQR9MLIYeJca0wDypyiTdAEQUXyHApK7AaDVF6QeGy8XiN32IAdDlQIONRbRT8AqT6mw==","signatures":[{"sig":"MEUCIHxXH09VTbRo3Dygp5vCdCyGKD84rxfp2acwm2vHZRU0AiEApG0/2t75f7i2LuulJFBO/HyuN1VuPJIpPrwiB89DEgI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjdxE7ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrl+hAAlpxk5qSJyQf/Sbkouka1jm5qNEAEneGW6AalhBky9uhwZZ+c\r\noC8BFFkTOVphNJkXtvNV3axcQeeQ3sZTBa5ir7BgrCygGGdyUZrwucQqdgKN\r\nwv5U8B5uuj6rva5oPyD+EuGN3rHqw5gPanGTnSZvHBpmM9xoREX0hpP3rOP8\r\nxIT/VXZeijn07OnsYPk6sWYbk2kyYqPUsM2P+x9S88LwGCKMVbF8iZkHQXtT\r\nUAzHHkJzxnMTzIOfvvsQPvfqU0HBscygnJB1VS/RdZGRt095xs0dnBmw+/qq\r\nUAqJewLYYR4p5ZVSwFDU6Z9//Z5LEow2oXNfLQsWPs1HmxNwwR9gEG7qozrS\r\npk8kq8Lu213WyoaZSKMloHcuB1zcuhYxjTB9wezSd9bNzl/xk0YBo1yUrAlY\r\niix8RBvE+94JMN+PMT+IXl0OPirU2oKTSuO+kBNQ4n3pQhNulognar5ksWdf\r\nurfhp9qzEAm+C7DgGwKPFVhaDH7Cbg43NLjV/gfcpMUqYmGUO8ld+x73nOVS\r\n8ZorcXKdsUzqqxzOGWKw1r/t2fARqSb0PKgE3NF4Tjh66mJ1uVs04uxlEUX+\r\nBwzoVSkS7RzeRTEoSxMd0WxMn7Yu34OKptxUNGZpklvnoB9OTbdwxNRMEeKd\r\ngWsXvxap3v5u4MG5L/YcxpKDTaZKtXU+LRI=\r\n=sZr4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"c12720c09369b6620405de027fa85d469db43e9c","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model.","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.10.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-c12720c09369b6620405de027fa85d469db43e9c_1668747579565_0.01354451578133209","host":"s3://npm-registry-packages"}},"0.0.0-next-2122563cf622c0d212372dee10ec2a4a664d8006":{"name":"mongodb-index-model","version":"0.0.0-next-2122563cf622c0d212372dee10ec2a4a664d8006","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-2122563cf622c0d212372dee10ec2a4a664d8006","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"9815053707e3a9b8181b4473e3b608b011ceaa05","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-2122563cf622c0d212372dee10ec2a4a664d8006.tgz","fileCount":9,"integrity":"sha512-ez4NMCmYX1/8D5vTaxZCQG86MnKNoCv2iAtBaz+AOhw3KcwpcodLv/CRVyalDCZu8W0EsioHJrxZKfMjIURPvw==","signatures":[{"sig":"MEUCIQCRcd5kWKW9rVmvUmeG9NaCi0z0RFyC0n9cUVAA6wJ7lwIgBfozsLk3tQ//U7TWY7EQoFQII6fiLPIo5sNOuDXmQ5o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjdxOJACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmohmA/+JKI2NgR9B/GN0reZN/TZg/BmAwfGgNxXfCW2wTf4aqmiMS8V\r\ns3qvO7wS6PwWxIdWLGOMCq8N67Vf0Qf5hRwDMHI3CJIiEerxXAM+gqBVqJ5L\r\nOBRbKwNzwPtBmh7UvjMD6hkO7roqHwLhbwfMhJQMkKxj2QDtbcFwvK8CEXlY\r\n8bEHkHPO//d3l1F80WecN1cfkny+uS2/HFwdspGZ+5HPjKUSeDRHV1ZOw5jj\r\nW5vuEO2deabgMzdBuMrE4HITfRSw0FaVENP8G6mfNPBTE2pgamikkUpD4mik\r\n49LZiFoh3wlNtvoclfHbHDxkgYWY3IcAbYZ0OSTTbGt2L8uTpiEMzCVRDO5m\r\nceYpjo6IwR1HSVZv9O/BPkaEVW3Q3qjUzAmoUZprAUmmUrl+YbVNlVQmGJQw\r\nA4FW9Qzidv9Y0tvHTQPy72zhSRJs8QLpKoKqIzm2ttKjtZA62xOEipi9AGXP\r\n79pQqhtXuibezvbSdteiwIf4tePInLB3JtfsYClSa4E3OFIr+RH5tiksYbe9\r\nFRsbAG9VIjLl2CeDf7QaLwIXlOV8ZY2CICbiiZyfU7UtSzIci9i0+1k3seT4\r\nkacCM15AePgWNUPpyOr2u1xBXMzKyyGv34ZnpyCrfuo4zuTkYU/FCy9rtzjS\r\naP7m1n8rKsdooJCOTAbeHrZkn+V83KeoZWs=\r\n=BDUi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"2122563cf622c0d212372dee10ec2a4a664d8006","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model.","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.10.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-2122563cf622c0d212372dee10ec2a4a664d8006_1668748169154_0.3204438177458879","host":"s3://npm-registry-packages"}},"0.0.0-next-c31c6db319e5099ee073b5782609b1dcfa2370d8":{"name":"mongodb-index-model","version":"0.0.0-next-c31c6db319e5099ee073b5782609b1dcfa2370d8","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-c31c6db319e5099ee073b5782609b1dcfa2370d8","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"f04d6d6b440d317eca9022c480ef098fff991a41","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-c31c6db319e5099ee073b5782609b1dcfa2370d8.tgz","fileCount":9,"integrity":"sha512-sVTS0uYqsG1f66rAH0vyi9Iha+1ZysmmlscR2Q9pOQaADdJc5Q/EylEjvSbbl8idqVb60WGA+oLnyfQAuKqPtw==","signatures":[{"sig":"MEQCIGKnEN+xo3/il3nvZMvPKyWPHWX+yYt5a3gvLVXHDE5sAiBZk+lTkl/cTnqdQyEcnc+y6aAnUZ4OW9nhGzLVhqTodw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjeHyjACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqHsw//RWPaEkt5pOGmTvxsK2tBS9rHdXRS4DI3+GERqg37JcbLUaDn\r\nM35P7Eqm9arvkujJv9rCQ6gPeLEgaO5MtNC0X+YflLC0/DHUE2j5COEKRwJj\r\nGw6FpUVeB/CAZ6n0HxSorfHv8WcUyzHz5ATJMu/jYgyLtzyvg3RVcAEwKLQL\r\n/NLAwog/xEu+RA5EzOtBNLo/cV3sTiQk6sRvkfQvtyy3yeiJGU/qRLdP7PO5\r\nzsOQfFZMfvnJ5DlQtGHHkTwuBe1jbRIocoHKzspPYapp7bcpPJVKpI7N+9U2\r\nxQBC5VS38ezn28A+HiU1BMTc4nsTmoW2umHOsB/fXCxf5z+jOl1iEqd3fFCX\r\nTA6I2uEp3r+ROVAY+L7cuRakE/dF2x9ocsgDJCdSuAAyzGRUeZGacEW+ScQX\r\nRvzd2/ZOdTZG3kt4B/9BvfwRrqwdJccECGLrWYWfiEwJR56mQazvnCOfZw5a\r\nmmFGLjwQEwYKF48UDgIIyvnxeT03dkCcRdK5yBRYMPeOz9FdrdWNKyIkhGFm\r\n08j5om6Cv+2OaDYSwoi9SzfjdKrULGsnE3k4gDmDf/n2tP61+8QrPU9LngD4\r\nxwTSgw6XukwGdpYWp/lyt+IJw5C2J+jP6gK2Nt93vKbuANH5b770bWooWnPv\r\n8gPMxPbgd410VyTmx+7JQDHf3o451qs99og=\r\n=qb7m\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"c31c6db319e5099ee073b5782609b1dcfa2370d8","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model.","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.10.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-c31c6db319e5099ee073b5782609b1dcfa2370d8_1668840611539_0.6312036312294689","host":"s3://npm-registry-packages"}},"0.0.0-next-981f8ae49e299320ca0add5ae8e58c8738baa699":{"name":"mongodb-index-model","version":"0.0.0-next-981f8ae49e299320ca0add5ae8e58c8738baa699","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-981f8ae49e299320ca0add5ae8e58c8738baa699","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"a3dcd4fce06695ed8cf146c2187cec809883c083","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-981f8ae49e299320ca0add5ae8e58c8738baa699.tgz","fileCount":9,"integrity":"sha512-pJvRIJH1B9SrXLEL8SibwKuPuuqwRM5tgtsoCUjT/MkgcVaAfn0iKf1/pmqr0yxHnnCRKJpL5mvN4bxg52Riaw==","signatures":[{"sig":"MEYCIQDURLyg9MeJzlLqW07niAiHv/x2reOwoIibTM6KsNqflgIhAIa/K2d+9IAeqlVcdqKqnbaFL9MaOElcomGmBRCEN9l5","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjeH/aACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqktQ//YEVVLjjqISFZM5T5BpAuGs806ZqgWjOd6zZI6UuX10xIl8ZJ\r\nou9jqQt1pnlayef+zC+xOUbTSSdPBbBK6aHGt39dGbfAZbMX+sUfpfF2blPc\r\nLoGntzO/4CgfWmvtMQX+04YK4syOC1k2l6Tce5HZKI9w2BesCch+iZLbHG9l\r\n4JVFbPnB8mIEYREBfrg3mDf8HdXX76hQHJdk3nEuEjeKpL9631dkACV+yyKZ\r\n3cdIKzbm9jxPHqYSbpaFnrSQErJKHWZcuGsL79WxvDj6fuBpFuhTg+hbXvm2\r\nlVUFOBYF1Ui1n0hXGFHkXqsyJnth1sZA/QGE3XKDpdFrZBG0OakX2NHNbFOi\r\njEGqIkrxnhFB/L881tk6sCcHONAesYjEJEBh9hej4MLgVSk8geXuTEbBHi1L\r\njsdVt6rGc3xjQFJkIn8rxIk5cmYKbAv/t1CXnNcqmkrnfrRqvuE8D5WFHWrV\r\nGdsJTC6vM3FBbXoGbef3JgHF9ezu8/WH72PUf4K1Eyz7loaShnJriLZJW/oS\r\nD406BjEeaIPYhRNsLZgYJgApGsYUxCu3ffbSI45JWpzLaDLIKkJQRDaLOPFu\r\na2fNxphhYx7IH8GyqbD5XZIIG03GJHR7gEiSQdpwBemGRL8ESwSmAUTiRNNa\r\nowxgEelHgGxetSTScDe1NyKOM1OlH8VCUD8=\r\n=7Zc9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"981f8ae49e299320ca0add5ae8e58c8738baa699","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model.","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.10.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-981f8ae49e299320ca0add5ae8e58c8738baa699_1668841434025_0.6975899584194658","host":"s3://npm-registry-packages"}},"0.0.0-next-6a646700444fec2ae51cd86f87f6a29e58f774b0":{"name":"mongodb-index-model","version":"0.0.0-next-6a646700444fec2ae51cd86f87f6a29e58f774b0","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-6a646700444fec2ae51cd86f87f6a29e58f774b0","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"c4fd6fd20c80612c47f1be51aacb62b86029b0cf","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-6a646700444fec2ae51cd86f87f6a29e58f774b0.tgz","fileCount":9,"integrity":"sha512-mibbZ4VBs83uu9vcXe+5qwA9mLu9tW4523rq7FQMlX2VKSTvHac9bL5o3A6ytLZIyhXNIyyZ6EyMcznxL0RGYw==","signatures":[{"sig":"MEUCIGEhGjHMIIM4R1+sh2xbwgNzf5dChhE8RnuKHRoBUFftAiEA0lKkAmL9V+OQB5W05uRx4h+wB0merzc/QMYz3hYY5J0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjeIB0ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrsQQ//SV1VFAo0PDd1Wfc4wtcMaQ8ahgIEbML3Zj+gr02tXYsF/l9A\r\nbFqI/yxx8zH7bMmDsyXuaM9oh3y8qk4CN78ibQNGkdhrkNK650EcnNKKy2K6\r\n8afUn6i525qvxFpQiVVSNl6KS62G46hzT0ckqs3yvsQvrIc7UFkKxfALtnEW\r\n5vIf/PXyJi4Pnz9dP0yEdUBv3gL/TZI/e9tq460lhhGRVzXu1/+LOsTbZszw\r\nY93Qs+YRUhyiE0OK9IFLM9pXno1QK971SifflmRAN64ospYlRhHDWnwHZZB3\r\nwpJTQ9OiVOdFbUHDbAQV55WNR3sARCD4rAmqAkduHB2FZ76tsPF9JAPmzFM6\r\nvgTul9RTiqcbnKdXRhiNB8uLXJU0++1jcT0MmE72XmL1fSrCX39qZDlR1IH4\r\nltUOakHrBIRwFC4WgwTzxCMbnupLTR9iholsBc8xuLFsqSYThGQ+h8NTdnaE\r\nuvbN5j3DwIPGV1/UAjSb0BaUAe0smL0kG6Bo7Dx8rcApZgpGSLWzu3glLrpe\r\nNPAOTYwIF4vty546hOJ9d+wlpB26aKIOSjaiQBF/wUFaiT+uB2yXNE3q+Jya\r\ndWIh+wdHPTrTj2ouarEMDDhlKFD53KiBYGZuVI5Bs24PGmKpZ567LXsS+3XW\r\nlp00gpNgof4U+N9was1tsfgfnqrnpntgV9o=\r\n=tWZJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"6a646700444fec2ae51cd86f87f6a29e58f774b0","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model.","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.10.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-6a646700444fec2ae51cd86f87f6a29e58f774b0_1668841587825_0.6053525416310161","host":"s3://npm-registry-packages"}},"0.0.0-next-112bf8f8b20d7181824478f76e627ee32d6e03d7":{"name":"mongodb-index-model","version":"0.0.0-next-112bf8f8b20d7181824478f76e627ee32d6e03d7","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-112bf8f8b20d7181824478f76e627ee32d6e03d7","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"c49999af82c82a4e347ed40f92dcd669200e1b1b","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-112bf8f8b20d7181824478f76e627ee32d6e03d7.tgz","fileCount":9,"integrity":"sha512-szcFJO8FcGMuCScbn7CG9MURIsY5Q5ZBXHgHLojECtxlLc2JnlunTQKk7o0Crtru0IwPjJ+DCOiRikly5cp44w==","signatures":[{"sig":"MEUCIAX1DidATUnhjmW+AjmMxvcS0o3hq+bP7Wd1URQ/zRAzAiEAoLilxG3iVhFWzcfpRVQOf/kxhGHJGYDY5UyY5mtWJJY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjeT+4ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoOhA//VL/1WvSWmq0U15VRJUeWeQrfNjSjFNTsnJFVbwHP5iM3QtmU\r\nAo0Suwo7ARXZBlFqa2NDsA7FyjNgeZsO6yNv96rzSSQCyeWJAuQI2R6LhtRv\r\nUZfd12bifzpzMo8ivNRb/8TNFtS8CxJNn0Qcvy6zY1E/OU9nCCunGbBNlfUS\r\n3yOQneIIGMqMYwoaqMZfUthYlM2DgyWnKa/hn3p20S0TL7HsguSooFCL5GIS\r\nWpo0JcwcWj5oG+ukAJ+ftjJk3Gq5h9HJeLVZGvnwLhhmXNgvpAkY66kjQkpz\r\neP8VPth57y2sKsnV5T3Hj+Hs80KvvLMRsv7wdoGoTRG2E3fK2mwWoG1EuKRr\r\nrsktzroI/P9uq2x6ZLMTqJXRmhBusmjNcJVLehcIPMUvdTjmDG3uEu4pRufA\r\nVOwjawQ9GxXrn1Otb62NZUs7bb+PyHovgYvsGS4rI4lOCBAWx1fzHEAEkaRi\r\nu1ABpYrEFLR/0x7LA0Ejp5y9OE1IQ3Z1S3f8h4EBEJka4uLYXRqNVJzav/t8\r\noa5Jsae9badEeflXTr3vIy4J0yq++xgETLW/QqCGuPi0L6B85SiLZWTXz6nA\r\nzRlb53V3ApWk9e4ZaKJkrKBobIYrWJqB6h1Fmvi8111idxbo9XXn+hqi/GnF\r\nh0LdM4mDJLT7V5wyVeorAXtu4GQPMfILPYk=\r\n=qJV+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"112bf8f8b20d7181824478f76e627ee32d6e03d7","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model.","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.10.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-112bf8f8b20d7181824478f76e627ee32d6e03d7_1668890552091_0.6233585648301065","host":"s3://npm-registry-packages"}},"0.0.0-next-19de7da29c34177349014132e37b723c1cb16ebd":{"name":"mongodb-index-model","version":"0.0.0-next-19de7da29c34177349014132e37b723c1cb16ebd","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-19de7da29c34177349014132e37b723c1cb16ebd","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"30d63980ff89327953f30019d96860cd4417ce29","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-19de7da29c34177349014132e37b723c1cb16ebd.tgz","fileCount":9,"integrity":"sha512-Pgbp7RXjfPD74a5BDLlB3txNyPi0egvU8MleZN+y5agfiejfbNQGndMpPT9yx6lwxcmx995CRRGBptJao3oLYg==","signatures":[{"sig":"MEYCIQD9DrMzwkBscVMlYJaMp97fuXRAYX8qCUZTYczZj3oURwIhAL4enNcBOK4s3C44TtzcEG4DRDFvfYQHgxywaXgedwVF","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjeVXWACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmprvw/9GxzMnosr/gCfHdnKlkxt7lUuVeC9vmjlhr4uNkIdq1Y3jS1t\r\n3bgqaqw1jNommdeSKdnDjFKkyZ/65bj3AEVg8zudNIPt/Zivcv7Xol+rlKtB\r\nAneH38Jtbntuoufjiu+qW072nLO5PDHWk9AJ4oPZKVNAG7Ek582I1dt+So9C\r\nbcFZHTJtJElQ++j3bfePSXJzpxY8h2b/8D5KzDItEhIV0oMmQyykNykevYGW\r\nvUktMuSR0K5hg1T5rm0Cc9IU6b+ZUnQxcHFXqbhH6a+uTaGu2Fvv0N2PlVmo\r\nZ4PkRHsW5VeYUmsV7UKAcBcW/iwMvUhnarUwQECInZd7YCAp4Wk/HYZZH8s7\r\nfYtwHFpv7HN1G0Rdp6EoKlpRTVQDG/GzCWwQwP6de6jNSUL6Xbt+9QZLdLbk\r\nP1BKxkn/GyRVO7vcTg75DOw51LmsiTHmBhwZu33rb0CZBAJFFZwx0ErWbmeH\r\n2U5CXKPx9Wo8xPhm2iN6Fd+9fKQSqUtabr/+v09SuKXi6mYlctV+frZVKzwR\r\ntgiNsk0oEug7pLrzUMV+gqv/z7Ocwhseuu2JbYo9S/ec/W38aX7Xbx5hvSgO\r\nr6wxA/xTd7caTt+MS7jU+hHrzgWQpg3qqn8pzWXK1LEqQSjJ81YCUtPLjmya\r\nVSyHoEYkH0jj/D5hXhjyel52D7vQOngGTLM=\r\n=JmMb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"19de7da29c34177349014132e37b723c1cb16ebd","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model.","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.10.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-19de7da29c34177349014132e37b723c1cb16ebd_1668896214709_0.8563580784326872","host":"s3://npm-registry-packages"}},"0.0.0-next-1484036deb50fe0421bb8be4c48b2f9e56c17a46":{"name":"mongodb-index-model","version":"0.0.0-next-1484036deb50fe0421bb8be4c48b2f9e56c17a46","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-1484036deb50fe0421bb8be4c48b2f9e56c17a46","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"662df9fe9c4a7a915ae8ab193984035ca96ff517","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-1484036deb50fe0421bb8be4c48b2f9e56c17a46.tgz","fileCount":9,"integrity":"sha512-/SYm/Fd2Vmi47xz4jqtjMh1hXiA5GS/4JINQc5Stq0eFBlHs0dMeA7Al3YoyEIZsOQ8KT1N4v8IkcztMTAR4FQ==","signatures":[{"sig":"MEUCIDwFvvr7ScQ7FpW+EN8xMcOsmOG5QOVavJHJtpaCKs0hAiEA6sgPbj3zBAx1FfV08G2w/YWp7z2qBP8a/RoxJ4AFG1I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjfDarACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqIcQ//VChOBI4bMZSKTkq5DUCdbaI8bXHrsIPXC6gbCmZnFaYT9DqI\r\nz1cvEvS/lSqVKVHXIpItSirYerMbtPy9pIWahmKd/gSkDwj9QcHizAXDd+w3\r\nrlXuOYmJIPYsa4x2dkpXAs6Q0qgBhgg+Vwr/ajhLK5RZEXFiC2lydiUB9gVY\r\nDvS8UiP9+y25Mt3tfJKR1SexUmNUtEh+NeKlMvfZp52rFTBdId0pDGBtkc22\r\niR/zF1xVFk3Hl4cyT5dtqkCceG7ue6lizvFykMv8Ip4BT+DRiuoToSAgJD2G\r\nDqvN+yTSmLpdue7ebgcrsIsfmjaCRP81AmDGmHrI14Pjc38rXFmmbmPtiLZV\r\nL1v82EGLs3ntLJc7yVqpzxYhEiR4tiag0yTetV78gYyTw6e7bLZAv+3qPRn0\r\n+FZa3YCQ+uao25KQW4jzGoa0AWkh8bz14FYhVyi46Bt2brdjM3yLpEUSY51p\r\nZ705XD22je0gSdevJTxydtE0HDB1XwK76Jmi7KUbq/aEysuCh4MilQv+AJ7g\r\nShF3n+3mNbt+fBtrQpTgYMZpyoYOch3+JE+dW+uUBc1buWJ/Hb9mgBzdmk6H\r\nvWHT2SwiyDOZ0SjLpAvRFTqX3W0bfKj3m0JBvehpEYhlZGYz1BA3u+jzsJJV\r\nrjp7O4Py+oohoO7Q7Fgl4ucUSGVNrW90fF0=\r\n=MobO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"1484036deb50fe0421bb8be4c48b2f9e56c17a46","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model.","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.10.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-1484036deb50fe0421bb8be4c48b2f9e56c17a46_1669084842886_0.9126928481333927","host":"s3://npm-registry-packages"}},"0.0.0-next-6e34a0d07479c665cdfa3bddb6bfd864365f6b8a":{"name":"mongodb-index-model","version":"0.0.0-next-6e34a0d07479c665cdfa3bddb6bfd864365f6b8a","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-6e34a0d07479c665cdfa3bddb6bfd864365f6b8a","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"e793d391ef1dce9db2647cebdc72a19d94634289","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-6e34a0d07479c665cdfa3bddb6bfd864365f6b8a.tgz","fileCount":9,"integrity":"sha512-I2nMktjRPjs1Uab3eyX9hb1339/PEQXiUZ2/Rp9MVVugWYKH5nEdxF162DAh+pH72xE+8sE6LUjJUXf4v0FUYA==","signatures":[{"sig":"MEQCIEuTdt23EUjvZOJFF9ShRU/KTfBtt6qPP+v5fte77HpCAiBEnKIitHWYHO16rsYf0npiSKcYmpJnUJyYuZp+AMZ6pw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjfDbeACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmohIw/+OofakxaFg2liYL3qrDszM1dZrUeP0QsiRZjqEpbTxA05mn1Y\r\nHQPFohD/aSKTZAfkNcWjWegbfjmNlcJG/EsuU9TVVrw4xsyMBhOVB6+sa4Ml\r\nWW2AIIrSKmg/p6jUVe5kWm7whvYVzY2WX7ehSDraQmnL55e+5UiSFEW7NxSB\r\nTZjx3erYSkOD95ttjmrSJIg5tyXY6dgYJu2ZmLIjxkOfO/vFH1rsAh8sTm/s\r\nuedOSYyJ7dB/jXIy8L+g9bVAazWB7SNQR1X4RwFDU/qNFkr62uuzeOf9ab4q\r\nK1sv21QysRJFYDnVB2u67iQGyswUSh5Oh9qFnoiltnx5czX9BYEyvNkkY5ED\r\nTLr6DUbOyvHQh9Md3GuFOo3nikHRZw0NBYuZepHKKTDr98LQ16gJ5gvISnEe\r\nuWR2xDJ4dXigoL6TuDJr5fdP60ilhZH+Q6LqII9J/qDMBMlr1r2h24jbWSLu\r\nbZqxeMhNFDMbMXpN5IPNUptH18BIOJPpbnRiLo+vtJi44kwMmJuDnW5VaS4u\r\nbdEKF1fWh/ibBRJwolIxpdG15AcKnCKSCkwTHPcjeJUWSPskSa7v+8Kr7+Ew\r\nXkL/Qs0RpNnamqWwILWzOvs1ijKDl/SNmauLbEqNCNuvS6Pohg8kVkQincG4\r\nJVqYYy4WXbwEApXuY/yv3yruXXl1TkWi6HE=\r\n=g0Ju\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"6e34a0d07479c665cdfa3bddb6bfd864365f6b8a","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model.","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.10.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-6e34a0d07479c665cdfa3bddb6bfd864365f6b8a_1669084894419_0.08333183459163895","host":"s3://npm-registry-packages"}},"0.0.0-next-31a3fe49cf0eba4c3afe85c4a4139ce198cb0e51":{"name":"mongodb-index-model","version":"0.0.0-next-31a3fe49cf0eba4c3afe85c4a4139ce198cb0e51","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-31a3fe49cf0eba4c3afe85c4a4139ce198cb0e51","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"30023b3444fb5cda42af9cb1ae93632a60808d67","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-31a3fe49cf0eba4c3afe85c4a4139ce198cb0e51.tgz","fileCount":9,"integrity":"sha512-MYg5ymO1aFhQ9ApOyxPtr4yFQFn/CR7RBmySNYOdho8mlg6H/1CiW6EfmkQIaw46jVCg2ItrnLH97OkVONFB0Q==","signatures":[{"sig":"MEYCIQD5BHsry7fvrIJ/sCul/YM4gWP65a5EkKCw6bNX1BVmlwIhAMYhPH1Zi+Y+QpJ5TWTS55Eh7Pck0jH0cWgDpDzWGbD0","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjfDeLACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmri3w//SFtnbCXVkQuA+tJiI6hqr+umabUgZITmUVw3LgJddXgE0iO1\r\nWG6q63v+4ts0bvoM6y8JAJbmOA9Sx1n3hPEeYgg00OKwcjuEN+Ch2Q4X5O97\r\nG2HlkmTjM7+TTvRcw2Ia+VPTLOfPJuJeho0PSv37r5OSe/OKnLs/OsM2X09p\r\nlWZxqRdMmrxEThORVGNjiHWJghcMRorH71SU5DXpXrb7Zp1PF0mVBx7mfQdH\r\nc0C8GTKtSaIABdSRZ8krPeTeXZvdfP2G5L32BG4Ffk4MeQ5Em++paMzS9L6U\r\nTHyC28bZQOqW9flYjtQGC9NFJHG3Y3kvJNt9Ww8qXqXvTF8SXj1afUPCYmLM\r\n5H0x7R0H1WNqJVzxaVSEyh4LyaD13DGt6YI4Tp+bvN0F1BEPgR5YHUcJJFVO\r\nRs2HaL7/bMJdUf5wEHJFo0ACnEachzkAz89F0wzWZMicTJY+SfsI2iovK3ZP\r\nhjbHiUQbaCW17jZQgm4tkFXXlW6UDho/v9cXYlhK09oIzrtAz1LM623mzxLO\r\nX8Tqg/treJ+Yo974QUrFjg6axC15rxoLnsZvKn+8sGU1N3knyo9fSK/t6bzW\r\nHyZsJeahO17vxtn9A40jXcjpQ8oE2wJT7Qm3ZkiuVqxuqKxpUCbPS9hBpUfj\r\nUCxpCaKJ4wGzv7Oddrlm3HHZcd9N65yaAVs=\r\n=z/gu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"31a3fe49cf0eba4c3afe85c4a4139ce198cb0e51","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model.","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.10.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-31a3fe49cf0eba4c3afe85c4a4139ce198cb0e51_1669085067166_0.8282353053427554","host":"s3://npm-registry-packages"}},"0.0.0-next-bb1a39e78c30cda5ef910174e54d2c9708186388":{"name":"mongodb-index-model","version":"0.0.0-next-bb1a39e78c30cda5ef910174e54d2c9708186388","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-bb1a39e78c30cda5ef910174e54d2c9708186388","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"da0697b15dcac42a082b05c277242574e88d5541","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-bb1a39e78c30cda5ef910174e54d2c9708186388.tgz","fileCount":9,"integrity":"sha512-iOI1ULZV573F2+sD5D1iU/4x0gKg2zWBjmD2dCMv2GEwuG8F4FNN1mtw/rGVKwGHwrVx+x1eHp8QehkBjeQXCA==","signatures":[{"sig":"MEQCICrcN6iQDLfaURPYd260OyWxm3i+vgkQZbOkA5UdNJEPAiB4uGn+zLoEL3Qp+fd/Iqa0uWtKzBAHfvagT+Why8J4Cw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjfDjaACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqxhxAAjPGYryjMWabsXRzSXnW7dUdyHSbLJ3D7J3ZsG1cfuCohRn1t\r\ng2bwF9tyaR3EqKoqimzOicnzm9SF1W1ID5eEiBak4KY8Lx1roCqP7/pfQ7Xi\r\nbzDki1ewugCku0K0VP22AhG7vdaPc6G77pz61brG2IvvF9m7kAOIBf+C9/v7\r\nsdYqfyeKq1sEj1s6woJFjdrZdCAZ9Adc2obG1ZZtIqOq6C9QamuCeiRUNNXZ\r\nyboz3yq0q62kfVe6I3iB4QljAkyg8HKJMRZJS0t1vZXRjwjQ6CHo89t2pe6v\r\n0LW6EXwjeEMKWknKZYYqAWC4zPtr+x3twk/SsnNhbJTPxT9TEKN/8a8XsnqM\r\nUVAGqn0yZL+2s3y3hDPAqUtawSv+h72sJVNF23bLOchl3J+JZ+S62QSlKp1K\r\n/YwuCZ2Jg1QCitXkwU+C9FBQzvsMfKGlhYPTrVeZLDB7DX3uBTceNuXg9ude\r\njfiv5+BHs4Pe70Cbx1kzgjG+WK6GTnCt4Vor+7Ahm7vxvaUKwsePrPt89zFZ\r\nI9jdMeMknNvUUfQy3oGgwEV8cSOg4PIPgUF3m/RToZHinYdyFLhRYrTCOqe4\r\n7kYe1ccykp8SzJ5nlw9IL11f5OGGWNVu21t6STxQVausnVxCNHNi5XUQrBjg\r\nPO54Y2ohjMLnV89CVW1fvIM7SndP8QkrkQM=\r\n=CnIk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"bb1a39e78c30cda5ef910174e54d2c9708186388","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model.","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.10.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-bb1a39e78c30cda5ef910174e54d2c9708186388_1669085401993_0.31847066293143267","host":"s3://npm-registry-packages"}},"0.0.0-next-b5a88ca5d89936f4997a6df7c6e08614f25de0a1":{"name":"mongodb-index-model","version":"0.0.0-next-b5a88ca5d89936f4997a6df7c6e08614f25de0a1","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-b5a88ca5d89936f4997a6df7c6e08614f25de0a1","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"811bc5041103cb9a7dac125b87ecf9c16f73ea5e","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-b5a88ca5d89936f4997a6df7c6e08614f25de0a1.tgz","fileCount":9,"integrity":"sha512-Lmrft3It1Acm6Qu7kPZpb/apTIbG4gjM8Gj/tFwDeYTok+492Waquh9sIc/iG6viLTqDgN51rz/EGpXV661CwA==","signatures":[{"sig":"MEUCIQDwTDsDRRTpdRhhLpm6CNach5S/pMlG/bqOuo5SWEdXqQIgGwzUj9m07PziGWE+Trf0Bk9Sl6l2+r1ya1j2NN+uQFU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjfDlaACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqT7Q/7B/L/njljR4oNahxw1Izp+qrYO1vx3OuKAUeSQCeishMZ9FCw\r\nZfQ4VcIt3LKLCe6ga50Nz5+k/iE5t55A/VMw9OUghx5ad5O+yEtodnjjsFND\r\nZ7YSjCGdut0qhQZpe9fTow3TWDfuq9eDQPZCkBi3bdZZDpb8+EAFdCa2cQJW\r\nG6L6PFwyr73hSYzMcpJiN6V8gGPcZRFuThHoOqFKNjUxI4XsKxzhqkN8vnmx\r\nrm91pQrdeUAYollj6mtzHcqwhq/sxNfed8j/fahW5+DUpqHCGAdWsaaYHWuv\r\neZvcdLNTv42CBg+1N+YV/e3hQ5avDc6cgpIJQh/LDm9mW9G+2KyFFwxMZ61v\r\njdw9gwCHReiQJlvUQO5CPEHDCQDILRHgCguHcfFXNajLIZFQj5W6fk1TMxg9\r\nba8iE1h4cblYkj3ZXMVsi640Oeb8mHZpsuzDAvXpOjnpDv4Bl7Z9xsP2Gfci\r\nN4U4uS8nMTFEvjLADcKTpktWa/rTckSFXimPh9sgVxZOMmfm56cBOFJXL3Fm\r\nAoYtWQz4110E/JJkYGTFO8wFSjQdhMv5IQCnV0+1mUVz/Ddg/n9vyccBH81v\r\nlHS8OoK+Km+ILb/0WYwkZDOwTbm9Afy5VQBFFOUxYPdlIu3ueu4G09UjIgKD\r\nO59qn8uOyx7rq0MCXCcSNpJBQa1k9Yj9K60=\r\n=oqyq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"b5a88ca5d89936f4997a6df7c6e08614f25de0a1","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model.","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.10.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-b5a88ca5d89936f4997a6df7c6e08614f25de0a1_1669085530187_0.9474955160621021","host":"s3://npm-registry-packages"}},"0.0.0-next-9a3af5fc8cc6a9ccc96866e1b71d0a33c14d7c08":{"name":"mongodb-index-model","version":"0.0.0-next-9a3af5fc8cc6a9ccc96866e1b71d0a33c14d7c08","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-9a3af5fc8cc6a9ccc96866e1b71d0a33c14d7c08","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"b2e6fe233b642428d2d7d411622c8d400bf09114","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-9a3af5fc8cc6a9ccc96866e1b71d0a33c14d7c08.tgz","fileCount":9,"integrity":"sha512-sdm0j/azKLH05JdntWYRz/Q44rXghkckoUrKbc6iGt0LmQjp2oAMDG/XLd0q5LgP9RccutYQUtbupN7woTikDw==","signatures":[{"sig":"MEQCIGY/9Vpa1Gs1R1cFqmKddU6oTB1bijsbhQtI6nkUEPhJAiASY/KdzOSOwmRe3NIqESgCBzLjcAAxluGwvJIuY/i5oA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjfDsiACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpkbA//axPLmS025sSikNgvoBSgOtROOdAelJdM8vHnV7j8/mRqgye5\r\nwDtZ4ol9fkLX6MVR1l68IJmJajwlArvRCGg04/oQpa20ibkEoHlrBM6v4TnQ\r\nHNoBcGTbwONTFCzKncUgw2gy9YVOrWQw77RvebB1vxh2YP8SH3UpopiZSRs3\r\npdaDVAmQfkIB+/8pYWuFqk4IaVg8rKJW2leHAUNPofmsnxmNpZTdwSBZI6tm\r\nZ8KnXzsnX6ZjIkniUFAp1yKVR/ON0XDGKJDbBBTAA09ezGXKvgOdDW5atGam\r\nu/qeC9hSBGJCPrtsv12BlvZhsmXEyICrbMs6HGwvMVX1tflyklPVLLhBwiL/\r\nczdnSlXi9k73JW9W9VN0qqRrD2xnvo/9S8KbFJ1xYJprqqB7V7c/GC/6N4Wk\r\nt+7nDiNu5eagqYxSAqrhIhY4xw4IUWTucqqQRRFsW2Hw0cwvDcodE19VurFD\r\nLqoE5pZBVdZejFuFEJDhDW5krnGox+MeViLCr0HL0EwSu8fGYOCV1MJgqyTq\r\nw6tIea6I5kOprBdQD9injmshxDv8dcAG3obXRGCbyc9CVB6QTdExTyyjymIi\r\nsfvYxV3AX64YSNVinfejjHowA8Nu0KuLKBo7qawBMB4DGBQZC5fhhmIsqc4j\r\nhHymuRkWLOEqDOUDCT4Xq0n8ihLAIebdO5U=\r\n=Mi3a\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"9a3af5fc8cc6a9ccc96866e1b71d0a33c14d7c08","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model.","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.10.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-9a3af5fc8cc6a9ccc96866e1b71d0a33c14d7c08_1669085986003_0.8039825396237472","host":"s3://npm-registry-packages"}},"0.0.0-next-2cde0fe836b81baa0f68d274840a5f97b8dae0c6":{"name":"mongodb-index-model","version":"0.0.0-next-2cde0fe836b81baa0f68d274840a5f97b8dae0c6","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-2cde0fe836b81baa0f68d274840a5f97b8dae0c6","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"7cf26f1bf783a2e28c80476153f6941397ab1399","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-2cde0fe836b81baa0f68d274840a5f97b8dae0c6.tgz","fileCount":9,"integrity":"sha512-aixZNaz9ap/zbifaaP70ki5rLGl9UXZSyfVs2N7FdmC8N8olKe0vLaN7j3CSlZZtdV8a8zVN4rJl0lRLW9wb9Q==","signatures":[{"sig":"MEUCIQD2FaxP3FsAqjYWsXF6W3Iga2c6x+xZg9N82+2vRq9kVAIgICYqVRIc/H7GloRru48CKkhk99uMGpQPghRk7u5i6h0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjfDxZACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpDPA//fjJCuaW4HpvTOQ1Xe4Hw1r8ZKTab4sucWxy9VrBpZ/+xjCZW\r\nizuFsS95/S7ub3QYfGqm6aJAxzFQMacB9UgKcPne7WUh6Jx6vNlh2QBydU3w\r\nzYfqcZ5/9N83N5vSCHEN4XiyCrGbDyAOymGRaZpVc+qXUFGB6QYVV+2ASVyy\r\nghW7aIsmZiX8eekHlOxuAL/AIQY4QRCwfFW17vTROso0R6leYhEert4gmvMz\r\n3h+kXlOuNP6cUv/OFHEJafyEUT+h7bMh6nKW4OrV+HoPZxLe4yNEa4LFXFcT\r\nXkTV1wa9dY1vvKqiL2L7vi8bYVfTZVN9KcFjFyRtCOv+THAcNRkEExBdeAch\r\nmnG8xYh/wWcaConKk9ZCV9ywOu92njE7qv1qAuV1N/qthGF8FFMDIdPV0Arl\r\now9LQoC9w2Kiu1scNu9+4ILyQh+kCa8rhNV508PoCB82rnxIC0pxXXnVHmZH\r\n4pDgr55hC/5SJd5UWVQFqLs45BLPIey2vBxSxj2C1bYSPQizaVxgqt8fIixZ\r\nmT8pTusAW2fnkdP7TE2U/LKl8TrLVfZoiRCVNvQM0l/5P8p1lrUPEnVIE+EQ\r\njgjDiDLVndZ9nxrK8FWLh/q2D7t5iwCbnu5z5XGRDgG3dH0AGRgpyJ7jdjeg\r\nDEfpfdX4Hay17Vzudq/hgdNpCZcoE6aOXWU=\r\n=43kF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"2cde0fe836b81baa0f68d274840a5f97b8dae0c6","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model.","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.10.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-2cde0fe836b81baa0f68d274840a5f97b8dae0c6_1669086296932_0.648645984949213","host":"s3://npm-registry-packages"}},"0.0.0-next-feb0121be4234a831e6bce640173de34ce95dd7a":{"name":"mongodb-index-model","version":"0.0.0-next-feb0121be4234a831e6bce640173de34ce95dd7a","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-feb0121be4234a831e6bce640173de34ce95dd7a","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"b32461f49de06d183e1af8146c060b093179feca","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-feb0121be4234a831e6bce640173de34ce95dd7a.tgz","fileCount":9,"integrity":"sha512-6GTM1Kt+qttB8Br7QET1ykVmxEuW8bdKCDQFgkJxAjzw+tQz1ldnNgDbunQ8RoTSsN3bxN52cc9jpNxRbNh7Ow==","signatures":[{"sig":"MEUCIQDzixfaSHXpJ+t2Znou+rdK5CZyeNMvNVLGl05fWlzjAAIgRl9LLeJy6ny31jmd7Ezy+kZMfFFbub83b1b94Pto1dE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjfXm+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoB0A/+LTC3CzmeaeoeA94m/W3AVLtOLK+dUq3EM6Vq+c03o5cSdUxF\r\nB/4kv1A3U8m5PInACLxbbVZPg5+obQJg/5FPelVlpeScQix/+14sitlon4Cl\r\nLE1QngHDiPQXC2G+U6XqsDl8FHwQBFq0hXCfN6EFINaw/dCVAToqHCCc3deJ\r\nIkhcQMyNhdeUfKV9nSMxivdzy/IvvTEZ8dCB4bd69ZIdTc+C0F79oSybA6Wi\r\nFDOepGOutWUNm79p1nLiYhhTqRNNHCcX7bkjxvlWHMJ9ebc9Tk0h6cdmbfSJ\r\nY9lOL4CQ43nOQ8nIaOt1EVFjv911WjXRqDarCvA0hVvLfnPe93h2nM1g9j8k\r\nZfHBswZtYnFnT1F3PzjZPXCxsP9L86IkWORvZEEs8sR0T84bgggsPXaqcFy6\r\nDgmRS1Rqne8oLPcv1844vxRSmGUl2Y+Sq4TtQGSmouloOwRm9V7mCXrvfDsv\r\njgWz7mr5N8eTf6P4v49kAUJ4w8mzeYTr4JmgnkzpQiPiTctZz9y0X5+N8fgG\r\nrt40A/K46ZM3/F5kuYl5lfpFk0kEpz0iW8662a2i9BRK79NpoZ5DJCRiUsuK\r\ni/nQZp5/xeycmOJjCZDyUiH0tgf8n+Z7NnGJIXB+pHEOvOz1HO2VAIYtCQzU\r\nq5x8O/7pl+7VQc4ffGWsLlxV0gtvfBDFir8=\r\n=ARaV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"feb0121be4234a831e6bce640173de34ce95dd7a","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model.","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.10.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-feb0121be4234a831e6bce640173de34ce95dd7a_1669167550046_0.3700150364034429","host":"s3://npm-registry-packages"}},"0.0.0-next-64ed9e6634006598c90fc79f71c554ec401bfc8e":{"name":"mongodb-index-model","version":"0.0.0-next-64ed9e6634006598c90fc79f71c554ec401bfc8e","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-64ed9e6634006598c90fc79f71c554ec401bfc8e","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"02725117f5eb09c56ec2d6890ffb8024aa538d7b","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-64ed9e6634006598c90fc79f71c554ec401bfc8e.tgz","fileCount":9,"integrity":"sha512-Z77NZ3DILYVbwwAPnJ/Uss/qQmrgfefgvZVyDdaqijtV6QYF8/UkFbSeE0s7x38dr2vQN/dMfv5m7QIbCWdO7g==","signatures":[{"sig":"MEYCIQDCkELopoTbKG/uRmNSaeLrdIDPPczb/1KKryFecd5gKQIhAOjz3OTNBP0QbqZ6Ej5Bnlr2KXP+QGcwk0xanadBYCEv","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjfYJYACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqFuA//RGDrJlejQ9DWjdZUfneR+9yhqSENoj7Fi//wdad6MUd8vkbz\r\nvG/urZond/oMtKKf1K7hLFgnRjzj437H/JNa8NNHkC6wRdUZf4dBj8P55ZyV\r\nLM7gUG9D8fjOTmfUmi5b2ro+/e9o023kdRZcNTAxttVr0V4atC4tPi+7l1Wm\r\n5TZol+ITmBDL+XEhNadcakPPCwTSiF0+XyLiconv9so7GElPG1ADqzXBnKk8\r\nBf36Gk5DTItBHGCaUekZdJvQODy86HVM7XgUPSLABeOrPuvL02d7NVkFVUl6\r\n7Tcf0oWyBW86vrGzwLSQUmYbX4YnQvvzkJf7BPSQFDxhwBo7M3T7pXntsPRz\r\nD5RzUyXv7H/eTgz0PCzhbQ1W44eJDXcoYJXdnf6eqhV48Kn5ga1CRFdNLonc\r\ne7TTNPZS2yrIDqhCemuza38zhRXs2ppetRtfTqYK+TTZFkwPsawMJTn8CI2A\r\nPnlwfBPlCzClCkao8ff21nAkW4NYpOAAR9ARDxQxnGj/94EKcBaCBmKl6kFr\r\nVOtzXO3F7pflk1dOdY3ZpiJuOaEBXwgJUtL5xA11wo6Z349U6FgRVz6Iis7p\r\nDytaLIZ4YWqhdHSdl+/aqMkZklwOaLSv9K2yqRsCjki32hfrdtaOVldlkw/M\r\njeweyKhNN5aM1zllzaXP2kMhEMI3Ao1f5/U=\r\n=TCLu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"64ed9e6634006598c90fc79f71c554ec401bfc8e","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model.","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.10.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-64ed9e6634006598c90fc79f71c554ec401bfc8e_1669169752072_0.6630335273343382","host":"s3://npm-registry-packages"}},"0.0.0-next-a005ee4428ffd61a00127102fa0c29212a52fc83":{"name":"mongodb-index-model","version":"0.0.0-next-a005ee4428ffd61a00127102fa0c29212a52fc83","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-a005ee4428ffd61a00127102fa0c29212a52fc83","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"553d7a05603b092e8f284d3cc96dcdcb58b4734c","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-a005ee4428ffd61a00127102fa0c29212a52fc83.tgz","fileCount":9,"integrity":"sha512-BWM0/6POh5DjJ+My5NrAblroGklqNWBnDKyiR+mPs0eYsk9+Pw9W7XozkcctvTxYUD+abPbGSs/HP4YMUdmMmg==","signatures":[{"sig":"MEQCIC9YZsh1bjM4/BvT3krWq3KccUDUy3Qx38K9zW83LJ0mAiBJuBbHWifkPrpvnkMVXM9s6YbkZddkYW6TXHTyBZEF5g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjfuNTACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrBUA/9EkKVg5wqlqFHtTiT7PEcEJGW8/M5qunm2JmZj/A5gHAcL0S3\r\nVQbYQR06DXwH0r+9ogmc6KH8hrTd69m0rjvh2ZV82BdWbf0EBy7x0dLliDJG\r\nGwMfX29GgwKKJXez7yvAngpU840PNN+zmKMPFweXmKqde4MW9lFdfOqu9M6a\r\nAN7WIH5iOq62c2Bys1Zxa/TKsc4qUmblkAD7vgMKlXEHdHmUjYxqjpaAvQ3s\r\na7qI4lS+ckY/eFw7GSZSVmw1Uk8YBOPmmmtyjo4NuoeyieqR/NPVaLYzKW83\r\neQsTjBCX3X1HHIdrcnZK/6xVxtXUUD877QCxmEhGIgj187k5P8mEzzWE/7bD\r\n6elx+ZZDMumwGdebOCc0dYUq0x1bkeNDrD3gg44W51t6so8HL3KQivUp47at\r\ni+RGGeDaMTTiUs/jDztunEkgpbeqoor0slEpx9mAHYn2zETsOMnFzdRMR8J9\r\nsZtQUyxDcmrazrZkbOSnSdqeAMCXFE//LVBJFhpKxPS2+ug2JSGiVpajTJw7\r\nVeML+u6Moil8YlLAWWRe7EM4/M8iVm8IaCvRM61yt4KRgdR6Lvr6VTzYh7xU\r\nS+t4WwLXPBQDjBWsMqlXQYwP7L0Uv6S5Ner/JYM3jpXAhhPz1Zt1LhmjiYmr\r\nl/m9opdmQURWiZnpFE0k47zPVYiZdh3icQQ=\r\n=JyAa\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"a005ee4428ffd61a00127102fa0c29212a52fc83","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model.","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.10.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-a005ee4428ffd61a00127102fa0c29212a52fc83_1669260114907_0.7198479728740108","host":"s3://npm-registry-packages"}},"0.0.0-next-e06434c386fd387cc5650fc9c0906b46cb4d6c34":{"name":"mongodb-index-model","version":"0.0.0-next-e06434c386fd387cc5650fc9c0906b46cb4d6c34","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-e06434c386fd387cc5650fc9c0906b46cb4d6c34","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"128f71c5fe8fb48220bf34aa94610ab31511dd79","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-e06434c386fd387cc5650fc9c0906b46cb4d6c34.tgz","fileCount":9,"integrity":"sha512-gV9eRSva1m6zpIo5cRBnSJ/1i1lCxdQ2mrYcVerONyUuX2HmoC6SFx++hCiAD7PETrHDlRZX23cREKVo0FAufw==","signatures":[{"sig":"MEUCIQCEOdgPpBXCUAAAMAT4qVvOv4Gr7wXgEpCVAsBunvh7/gIgR0D6TR+PhCVDHE8TTNM2uNnfGhBv6ivAAWQDrjMPbRg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjfuaMACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpj7g/+M2PRY5+WPXEWEGzoZcW6AA/IRxWHeIjrT6YOvJ+MuWA/zVrZ\r\n9F6vFvn3WAoxIlbQqGFrA2dV//A2Pdv0fkUEAE0UQ3k2jjKxqKHYyw8cNHO1\r\n4cHt3pTjCQoj05czZtA1dAWz6pk8Zk56BmuKrc7EXhlCU5+L7qF55POiFojO\r\npriB0B+LBH7ATAuyb6jWScM9fWScKzB8bNoto1blLxI4D3SGpBYqdCJIP4w+\r\n1asX3LZiPlRRCDiFp+gyBXDNLbryFmEz4D49kwlfMGfQH9IVqtNcvg3potcu\r\n1NDq1L0o1HCKbY2D6lCV4qAD4GswLsx+eoEnl4mR4s4MGz1F1Tk4gJowwsWo\r\nl6IXRra+GjButy814rkMfcQWbYeFnKOfH2qd4A8qLPCHuCyZygKdyu9/15Sv\r\n6YUqXlBO/OazLTmdPoZOymhjv00V22VkRRbWbctOuPbLQhF6KRPxcDnNk8YF\r\n0nFIOsbRj7wXaVZm8ZjGZ6BB08TEELVluq8O3X+K145lQVgju3U3U4xs1XHf\r\nAgbmt9xfiuKDmMFEYnV5YxSkYqZE/epxwT77eGhljvhgzL9NhEM7edORDT3c\r\nuvH5g0hZeHwmkqEpxrXKT1Oqhu4YaGZ3NJmsSfJ9/AqbfInvFIDXU75WHZXE\r\nJ6PVQHwfXEsnm68r38SBWs9JGlQxQxTveKc=\r\n=p985\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"e06434c386fd387cc5650fc9c0906b46cb4d6c34","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model.","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.10.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-e06434c386fd387cc5650fc9c0906b46cb4d6c34_1669260940122_0.2163096911280855","host":"s3://npm-registry-packages"}},"0.0.0-next-8d44ba9084fbf5b834ca7df8b77135d3c8fc6896":{"name":"mongodb-index-model","version":"0.0.0-next-8d44ba9084fbf5b834ca7df8b77135d3c8fc6896","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-8d44ba9084fbf5b834ca7df8b77135d3c8fc6896","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"dafa83a7233b1cdbf229bb3bed7769b593c2c8ee","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-8d44ba9084fbf5b834ca7df8b77135d3c8fc6896.tgz","fileCount":9,"integrity":"sha512-UJ/4mx5H/hopFXDdEV1I54zbZkK3TkzZuEvSQADLyCFG/6NY/B1+MCwWJyAPBnOkGTQX15/DXTp/Ru+7YiV0qA==","signatures":[{"sig":"MEUCIA4RI0f9rylqaF8m4bw3QJ1y21BQIWvLThkVQQp+RMqtAiEAgM6GDZaGQJ116p/BwxjoJE4duZqleI4un8IEMoQoL5g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjf9HrACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoJmhAAoGe+xImUQlh5G4VqoPwqiSCrsW/XceAieoaIQO6DlavlA+Ao\r\nSa8+7j7EAH7y1tl0+v/hBUk6fJG3BqG/+GzjBBYfLwsoW3u6FFZsyDj/3goa\r\nPL89u4aGx+DltYlpAOEgIbvrOgrOtdrmcTPLMcGLArGDjk5VlScosxbzXbhG\r\nOyI0NhfwHy20i2NtCEwA1mS2Wf6/lB1fTwMhgtRjmujN0SrkrmF+kUnzNVOJ\r\nDF+n2lEO4x1p95lEpQp3X8stLrOV9U2bskVkx/Ovd9enFOFKYVB1Ui+fH6O3\r\nK6Z7tskBO5Bqj+J9rsQQ5/BSERcviVoVZgTWD50kU5uKRV/+7Ra8R+V0sflK\r\nYP5YGCkzMZJTPNyRwrSKb5AT3bdixlYc1BSLNuRhzFxzXAnvxUTLyljIzGPk\r\nxbtHD8qdW1Gs+KFGM1JCd0AMZ/1sokl7LaSSyHLxgQvcIcWjbHqNrYYZ5v2g\r\nJR7FR/h757GQGzAW9L0kgZDZkb+uhAfH+K3WTmpcq6Gm1QjA/iSWMX0o6/ns\r\nE+SNxZT5PMNeDcJPIubJjvKHbKTe8UVfkSaiXL9KaJ9EDWTy6r13u2lBWqG4\r\njndYo/+VaFE8KhWYleMS6kLHJ4WosteL6v2jN+ZyPFuFxcbrPH718DUupKtI\r\nsQES1Z1irxi7KesV6W6xApvxxos0fOaMhfk=\r\n=8YyX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"8d44ba9084fbf5b834ca7df8b77135d3c8fc6896","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model.","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.10.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-8d44ba9084fbf5b834ca7df8b77135d3c8fc6896_1669321195741_0.8080431544374032","host":"s3://npm-registry-packages"}},"0.0.0-next-74685ebe9d7b81dd4a870c8ffd51152622741526":{"name":"mongodb-index-model","version":"0.0.0-next-74685ebe9d7b81dd4a870c8ffd51152622741526","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-74685ebe9d7b81dd4a870c8ffd51152622741526","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"27abecded167d2b4882fa00a3c5bd38c5e6d1605","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-74685ebe9d7b81dd4a870c8ffd51152622741526.tgz","fileCount":9,"integrity":"sha512-J9qotA/0gNuCXlWB3eR0b8oJ4NvJ4iVUZRe3ZMUCuDb4rEKof8FGNc7mEbBFImIDajgS/pmdRr8sPrSaD0ekQQ==","signatures":[{"sig":"MEQCIGBV2N8NSLJWKKIxDkx2E017lkiEpMyZhBWBXLIWEda/AiA4JICz5l2g1zc/1ypwoQOA+1S97++ar7lJOcOgcEMsOg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjf9NuACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq35g//Tg8o+eSb2vxpLqvPDMrkMQ2oqaaKj1LdndumYrw7sbZuaf1l\r\nFV+H6esR8zqMfluFlzy/Ues8Yopyq4AxvKdHPv/8gHlK/iYF7CwA0t4Op7uP\r\nJmWL4U5yGwvGSYSiKV/O3RYnFh0D6u4Rok76Fx7tbW0/vEKoHF6Ze9NZbMPh\r\nD3f2p8eHcCes2qEvSRykcEFnOy5YQfzh8Lt1l+SNPkYD7qXSJx6gRRoPC+IC\r\nOs4l8SNstZd8goeHpqXgZ0Pz7HcsyGIzo5/GThT3zK8aL5EFyF1CVrKibqtl\r\nrAeVlhReBQMhwHUy39uqpFLwoLe/Q2Pn4b87cX+TuwxywOVyRhTbqTXm/LQ7\r\nWXumX56jObhdfKRhIYADTfEn4Xqs21jkydk7YHCHt1qrlc3UFmfk9XJpikh/\r\np3GHwIOXY2nADUhfN9CufcvQfDES9Gxc6o+L4Al3LbwhDr6wePCzIJA4gNQV\r\nWNjDe9ehZM0dPeNrny+ZDEFFuQXIWYVki8OLRyxv2eW4f40GAVbonCzJ2MRa\r\nkrGdPDiwKFKwwfijB7VzDaemUEo1otoaD4zEwuY6WJ8eXKRWMzp4YAR5OZNv\r\n6Ujd1lczkjcsaxqLCTDnibGjS+V/pOFvJPZ6dFBcxvjuYqDPSz6NFdBNgRdJ\r\nDm2RzEWhxrHvMMOwtmvPMZwB42ECX8XZiuc=\r\n=gwSY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"74685ebe9d7b81dd4a870c8ffd51152622741526","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model.","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.10.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-74685ebe9d7b81dd4a870c8ffd51152622741526_1669321582503_0.08466099393471893","host":"s3://npm-registry-packages"}},"0.0.0-next-92270b35885e90f6eb7b153275848f7a2be21278":{"name":"mongodb-index-model","version":"0.0.0-next-92270b35885e90f6eb7b153275848f7a2be21278","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-92270b35885e90f6eb7b153275848f7a2be21278","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"86113b7fb1d57bd45ada404f2b1505f35a4daa34","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-92270b35885e90f6eb7b153275848f7a2be21278.tgz","fileCount":9,"integrity":"sha512-OrBA4+uw3HKxDiHq834pWiYtGKDY7MO1IANKVtk/HvwLrLFjsG1zZMe5D1usmaYug9fLXelBMRfgVncFaHX3Kg==","signatures":[{"sig":"MEUCIQDS8IjFXkP5AzXLDdASELG9p7gLPa28S6aeCVW4EzMAcgIgfiF9Bz8jwV4YVwozWow8zDhSeFfH2MBqueMYArnyEwc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjgJJ3ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqhMg//a74lhqUbnVTrXCykhAq4bmVd+S+lQOc6JSHwx8heixgZg0Hu\r\nLwk5b+yD/hrEusrjXw5/ZtF0VKFVm1u3s64difY533LhPmuUjnjSs9QGeHd9\r\nCVkxwuLrpONZ0NVRwQ7G+KjldIaTSeJlcEOZ6Zmk8u3CDOUM4ZLexfsOxb3B\r\ndp8cU3A3kKM9sajyscdd0X5/ldauBQxvj5kVGio5pS1f7NCB4RapmXj4b60l\r\nUmsCVWryC8X+wW9tYmohRnlTI9JzqlJavPz3ODHiy3HgtqYCUf16ekspmPWO\r\nGWu/8NHwA7CvuqKc5tq6y2nLAJMM+Jo3wgk9lw+0DsvoU7Ar5zb6eoqry1zA\r\nlH1hM2yTvk6CfV+hvgIuGf/YoJP0fv5wqR7990zyDdncbzxSFpi6hzmwXcbM\r\nC5LJF/+QyHiWIq1QubaEQXgSvjgDnjLPIkqaY03/4v+N+KgcDwXXFINgC6eu\r\nmxJTI1GWD5b73yOfih/W8vBSlgqzujgwg2DlEWhWEdTPv+1ZFsTqWRu6lu3v\r\nb+uZmkURoKB43lnNjWqm/3ICu7kWg9JzLayljvftaDGUTiD5F07lAWrImUix\r\n749gd6+zY9f6GB/aigud133i71icPgEVFMRfwnrKlWgC+h+pEjAjzCzOhXOH\r\n9HRv3MO1bBBcLXbBAT0kucIxm0Lfi7j6VfE=\r\n=joOR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"92270b35885e90f6eb7b153275848f7a2be21278","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model.","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.10.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-92270b35885e90f6eb7b153275848f7a2be21278_1669370487564_0.32309400156488577","host":"s3://npm-registry-packages"}},"0.0.0-next-f9347a106881d77aa4b1f7f37daed25d73c5f92c":{"name":"mongodb-index-model","version":"0.0.0-next-f9347a106881d77aa4b1f7f37daed25d73c5f92c","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-f9347a106881d77aa4b1f7f37daed25d73c5f92c","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"48981ef8c09f8d9eb75fa4c99268ce54e3029017","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-f9347a106881d77aa4b1f7f37daed25d73c5f92c.tgz","fileCount":9,"integrity":"sha512-ISyJ7s96YQG+oB84OL7jX7cbeolPckwyU9qeZ1XCGYyupz7CU/FIyH7Qxdxu1LDWSTi3eiYoVutRmU3WQS7sZA==","signatures":[{"sig":"MEUCIHH2Yh66FVVZ/Q9+DsCGh0tmalIPHbVFZcD1f0rlnkPMAiEAvoAP2hpifkZVjVWalaoBJ7yycllok4lDQt53IZRmJtg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjgUX2ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoH0A//cXLEpeoP6jOszZbLefjStN8oml2r8LEYxx1WRwtWP3SEyOIE\r\niGS5Or/yNHoxOikHRljOy0d0liNl98di+JWVklMdU9GBLn6B2uhZfnIVNJYk\r\nie8U0iKPg8Z98iRWVE5PXL/wSI3eWPFdFFzOCRnnTVnDFvnyI+OHOwU2LCO5\r\n5MVJzJv+l50+6sxX9riRNNga2G5hvSt5V/VaSCrYnDcmwwPW6Fc9KbGKh448\r\nHYY0EtF0BNCqZaEfOvxZFVxlPPo9hCAg4GDJRwq0ACH+dJdYWZ95kXi24mt2\r\nXoFX5vpm7Ec3QFSd0vpo+/0QSG4syWT+Vq8w4AZYxV+KI54WaHpElbhHoLo5\r\nXuefytLU/nTrvPZycRFuKRLOhUkQMsoKXY+jJyw5ZEA0JeZq5U5L6SJWbIgU\r\nNKZyzkO/0vORVvtc82y7+mzScAZtEFURcny3pTemnDwviFitWqpBsz6JnAkW\r\nXP/sSPX4LujF4aJeemxodRx5sCH+hlrt3rLSX3OPFmoLWgFZdIGGts6nlpkD\r\nXoid6Mr1Q3lgLNvvXkrcQeniPye6vyvVkF1Fu1C2DNp7MzmWOkTtdzQ8dMdu\r\nq9KfsZmww/IvrtXnSDCoDJNLCmdlFHqtsk2ZSUIhhzbx3zFbjHf0wqjXQXzH\r\nyjJzd+O8JOdfSkoxmdyVCh9H9/KwbF2wHSI=\r\n=8fRp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"f9347a106881d77aa4b1f7f37daed25d73c5f92c","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model.","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.10.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-f9347a106881d77aa4b1f7f37daed25d73c5f92c_1669416438299_0.5046496793310393","host":"s3://npm-registry-packages"}},"0.0.0-next-94f03d5249971d1eea1868df296db6e766f40f9f":{"name":"mongodb-index-model","version":"0.0.0-next-94f03d5249971d1eea1868df296db6e766f40f9f","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-94f03d5249971d1eea1868df296db6e766f40f9f","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"f7ec66f5f3a7a4f51de170620d589ac07ad629e2","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-94f03d5249971d1eea1868df296db6e766f40f9f.tgz","fileCount":9,"integrity":"sha512-HKZy+0QbIwVEyUFBSTDAMLSlr7+fxImdwyXuyoSIrMiO7zFY1ZJW0hxxtGdqR+R+S1ABWlYEDZKFDvBX3eCIkQ==","signatures":[{"sig":"MEQCIEd5sgWciazfCuwyizU0xYZ2/IVjOiDYTFxurwQgCR5oAiBFB8bKHDhph2U4cW9sU0kd1mrqwzCqDacnkSHRrE1d4g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjgVQ8ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoqvQ/9F/ryxAdNuctAwC42UJ2TLs1Qqw4hhLAUxHk202hpojRApZB8\r\nMY/E9OvXzSWL44GbdCb5ebZf0v+Xfanqey6wFoQ6JUg8QBDzVen2JUox4ePx\r\n/Vdy0KcBYk4AF1m1RrubCWTP/OhJBCxm93b4eQdS+ctMVj+C77wZN8jB1df9\r\npkc+fUUIK6HqmZPROubTiu9cplM+wujQrO6HgFrcoiKwMtj7EL9hQ0zsPC1N\r\nhEV74goTuQH0bX8/OJWZ+JVa1SnUvEdiFK96FiSpO9BVsyyaq9Vl5DYazHdv\r\ndsQDX9AXZa9yp6LP0IpnKVB3Y7M0JB2FhQyV/u7bpcyU39MeLSHVsIG69jfM\r\nT98pzv6ed4ajZB3Rap6ouWlMr8z0m5o43u1Gg3UoEUq9ia3mCrmofkrmiOLF\r\nfKgZy1k5PwSgNIB+aLHYD6U+3fpe+r/Gs2Y1Lvv8g565/8gRdVzNDK89CeuF\r\ntcSH2mZ6gy70L0SxA1HKoMKVw6dIiuivHuKhrOXcnfO2rZ1/JkQ8qQMRKyvb\r\nCEJOgwtWLPO0G091Hfy+0wywsK+lwXnbzNf/7MBQrFVJbAjGRIzMJi/GYO+b\r\nVU0lzyrkEPpdxtanwZHLhlSHOG0JI4qF9MaF6V5TqbHvkhucaFGiaExURpkq\r\nlLgKWDvzVvX8fNH+WFnc3j+PP06l1LNx780=\r\n=XcmA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"94f03d5249971d1eea1868df296db6e766f40f9f","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model.","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.10.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-94f03d5249971d1eea1868df296db6e766f40f9f_1669420092453_0.0419099597669379","host":"s3://npm-registry-packages"}},"0.0.0-next-e3ac63bd187d674b27865523c639e78bf78ac7a1":{"name":"mongodb-index-model","version":"0.0.0-next-e3ac63bd187d674b27865523c639e78bf78ac7a1","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-e3ac63bd187d674b27865523c639e78bf78ac7a1","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"c91a98926a02b8973ddeb71151a81dc2201dfb40","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-e3ac63bd187d674b27865523c639e78bf78ac7a1.tgz","fileCount":9,"integrity":"sha512-MCcptwUgg4M+Fhb8tokJA5FsJQW/dfvCyh49SxgCGE+f870/7HJY7CH7V8pLTcNoMzMVLXmXk3ctJBdQGSVHxA==","signatures":[{"sig":"MEUCIGSkwhlAM1D/3+HCcs7hBinwmbAtTId196z42QfmQqzyAiEAt9IeWEjAGRATwyiYP1yW2TWYIGaxKR8G/z8LrBVChDs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjhTGrACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrEdxAAhKioOOM4/1Q/bpGPqqQ0lRqccXsWMw5l0oCs7tUxOaeWcpIO\r\nn+QVZiPMUIO5OBx7xDpnMwnFRgl36WwIC/ckZTMR1Z0BfmD0Wu08c/yKhLJa\r\n61LpmjTXZ43EGYoVARpzhWYBGBKl3bSr5DptVEwbF94+lED5Gh9Th7c2oRG3\r\no+V0/qJ0juc8rGKOaIqWKM/HFitOlwZb8Slyk+1cBySPhXvqXJW0cUyW/Oqk\r\nnbaQvyHmqSBkGimlbpTnyVsnli5sfkRfgbb2GqZenc/Q3F9v6EyncQlM17Ry\r\n6U7FOgv7w+wxX5ikvQmWPx5N5PFOt910QaYXlzd/FOIRA5Fq2A2jJiFmyX1h\r\njlIeEZ2IE+U0Smz5Tfsn1wkKF29tFyAUFAZdgQ+6PxgdT+5iEZmJYAtdhGu+\r\nRlQHAnHdDbRxzT9PqD2ywbMvN9zAR/5IUpiJdx7IBHS2QSVz4KpZsp/WByB7\r\n632U9hNqLERRAfIv3z68HMNnSsXz3V9H2YOJz9rtpWjkzim1j3OMDdUTuiwn\r\n/9DdvGcSNiunjbxvgl7BmEi54aoZP4EZS+oQ2vjWt6yx/bL8E1SR/Gux5IXW\r\ni7Bmb6LVHAnFwEi323DzIuF/zeW1v2uxQhWpnpwrYaVJS1wZfA3U0+67uvRo\r\n+LS5tBTCUFOySWkLj3hWF98X1TSld6WR780=\r\n=j7TB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"e3ac63bd187d674b27865523c639e78bf78ac7a1","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model.","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.10.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-e3ac63bd187d674b27865523c639e78bf78ac7a1_1669673387319_0.4919188139230213","host":"s3://npm-registry-packages"}},"0.0.0-next-1b4197ffe591babecd7ad111b8f4e8e12f94e0b3":{"name":"mongodb-index-model","version":"0.0.0-next-1b4197ffe591babecd7ad111b8f4e8e12f94e0b3","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-1b4197ffe591babecd7ad111b8f4e8e12f94e0b3","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"64bd2f27d80b7bbb42a1972e5f6c37d88cee10fd","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-1b4197ffe591babecd7ad111b8f4e8e12f94e0b3.tgz","fileCount":9,"integrity":"sha512-K6F5mbDTRCLQ61o2ubYmX7xuLa1gvPBx2Fd/+ZoyUvI+rR7Gpxq/IIildERLxoA35AIcVOteWpy/SPeMfuBZlw==","signatures":[{"sig":"MEUCIQDoHwWAmGPlA11evTLOCk1tCdIkfupRoMHbnjjMh4KhjQIgM8R7jOAD71lM5weFekN8TDdhyNmobsWIVoRdoUkyDFY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjhTQsACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrxag//bfUvthJ+/McgVl9IcKcgZlw7DSBkYe1aUt6UBLY3Xm1TUvi9\r\nX/QshS8oJYNJT0ms4rkw1xOfT/Khnjmi+90ZkrPmMd/UFbkd18kecrw3Hth5\r\nLP34uCOLeFbIt7vmnoan927o34jveBrSS9/nFEmgiVArzPYespYNog468T1K\r\ntaW8906Dv18ap3PA7WRCAyMFzg9rc/zv9GyRT4uiqAtb5MV+SDTDHzpCMP7X\r\nWUWF9YNyNmVP7SxDS2cj3aMAoP+x8NYfdF9BrxuND7M24V9YB7rkXR6Z4TYG\r\n4qVWl8XWhzlPgS/HNlEISDprlaKayDw+uEidqsREXfoN4D8tifKHu1AAjkO3\r\nGq92S7SY3Gvt6PCfwqFEQVfaxEG9PWtColr0VqdHCeK8NdKLcMnWFXpfTMBe\r\nz7xpcBMqZT+ZIz7C0g9DaZrSZFAsMFv0iKINFatCGK4n2gW8GTxpT5a9KBtf\r\ngP8XgFTKfSzMIeQ9Aeyk8X0MfPumXhK/Yeikv2QPzALQpbNWvoFGVUKwj7dD\r\nzvx6dFglF8+zDjHiW+5yNdame9FKyytxqQ3lHtmdUFJKMuUQCRpg1Rov5J+1\r\nrBaf26I88o2zHMneV8dVnRyRpmlNMl8IwvPMQea/mASqzQHW7bMjNdIC6PFE\r\nwBYKOGp9QlOTyr5QxHQrZ033q6KpRB79DfI=\r\n=dwXM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"1b4197ffe591babecd7ad111b8f4e8e12f94e0b3","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model.","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.10.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-1b4197ffe591babecd7ad111b8f4e8e12f94e0b3_1669674028274_0.9816486172212098","host":"s3://npm-registry-packages"}},"0.0.0-next-aaccfd472a61651f2cd223e08a772916adea0d39":{"name":"mongodb-index-model","version":"0.0.0-next-aaccfd472a61651f2cd223e08a772916adea0d39","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-aaccfd472a61651f2cd223e08a772916adea0d39","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"127a6a3c1b4258c568c43d72af18ec549c47c6bf","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-aaccfd472a61651f2cd223e08a772916adea0d39.tgz","fileCount":9,"integrity":"sha512-j660UfSkre40gDfs/eaT/Rvi+JsMVeg2N1vQ4f77ynLXLTs49KAY0wXVGWZPCLlfrfieSej5pP/ZyZ6FOwj13A==","signatures":[{"sig":"MEUCICCmsBpH2HRiHPL3DkZYAVYUugtgIXeHNP41VeJrE2nJAiEAyBvvXtb7FrBuJlaTa7uc/JnL0I1R1BR+8YJnp9iqZvE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjhdLrACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqVhQ/8DUXGdyscsiBt2baU3OtxA0i1Maq+Aw7bkCE7t7263XDpSHff\r\nREj/Hmu75IJ9O4relQXigHZ/Qyjjof1Y976JlWnv7V3+UzHnr0dydl91vegM\r\nWpyzulZXzZJCtautEVNRl9KlEbQ7cDgP9ko1rH2XqgVM/SFjZXFdmMKYjVcK\r\nKEpNIWHMRIfqf1RBerAt8NIQJRRV9jiZQEcLs42844fvxGyKuKuhEsJLMfN+\r\nGondayrU4+XXomR628Y2e4LbwgGceIC+ZmJvk+pBZht720symgWwJR8UsADu\r\nrFaA/der2HvK2b7T/AbCVKxu/6pus1e/MBFKle0iGQfT23qGFDrWaIpkjQZV\r\nwie+fOUKYBmfQCBHiknVymkiIdz3U8fi1jdKa/xQ5vhOCtiB2lmtAuBk26kd\r\nhLRrP95LqyOgfRVfIiYRy+WFc5y8DFo+ABxfUlhsEhOKfvT9wZ3CDNkfWKXl\r\nqfFIL08iT9pi0iLHQymBgKYrBa3ZEvAY+TYxUxfIz2bdpgU+5OEhkFdTMK0J\r\nC7637cDYgE6FZZogjaeVlVdp5Yj6Kqz/lWgGs95Mb1im+9LMHt5abg5p06r/\r\nYCtw1Vye9vHSAs1Tk/AY3sJ+27Rn/uzcSlBkcmnKxVkX57f4IF4LNi45ugW9\r\n3YuJIhwU6up27TZ5wPp4e2UbTem9cSBJLuY=\r\n=pJ2P\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"aaccfd472a61651f2cd223e08a772916adea0d39","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model.","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.10.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-aaccfd472a61651f2cd223e08a772916adea0d39_1669714666919_0.22803790558074377","host":"s3://npm-registry-packages"}},"0.0.0-next-92d0020f1616b24273dd45bcadc1f36b47a690d7":{"name":"mongodb-index-model","version":"0.0.0-next-92d0020f1616b24273dd45bcadc1f36b47a690d7","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-92d0020f1616b24273dd45bcadc1f36b47a690d7","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"82090ab5f663eccf4e1dfc7dd9d6f80afc5b75f5","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-92d0020f1616b24273dd45bcadc1f36b47a690d7.tgz","fileCount":9,"integrity":"sha512-6zbgbRTPtuXQxwadF1ZWvfSl0NY/bLkmcZrePb600ZNvd95eTceRzUeDPjXZaX5CYalkQr4zn+mx7DAK+DK0YA==","signatures":[{"sig":"MEUCIQDONuGV97929gFagm/HR0xEm46mBt/o4pNDxKezNp97DwIgKl8RQOEuleiwkarru2XDjwLwQk0u/gJaMpobYQSeBTY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjhdMuACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmohqw//S/qjaic0wB13fe2M4SteO83l7FuZOuUugk3NwhbmJ8AG120G\r\nivyy401DNJKYW6mkD2xrbHG/+Rh9T7ilWfzDpvKaF4KCQl2Pju+hYgTmT/TY\r\n/u+9jN1/c7aNPrgFlHIM+Rq5wmox6bNPi4sYK6E4ccxbjrcoW0/s0VpIhVCp\r\n+iNutrAbu3+gfPOB2pFpgol7AXUvX2NP/Tof/8L2j+0A5mTfJBbYfadXhjbt\r\nUBtd7arKlCiADKmJ5TyQaBS6tTC70mD3rY7OcuZKyuFnno1Ihk5y3iHqdcq0\r\nz/jRTz25ZLJUAchWlTyI9Tf7nnMkXGGyCzorQi8qY+UvyflIgdGbUHAHdrxL\r\n00IHk4V44VULewB7AGFANnV99a2Fs+jTTP3PKfiuAubX1KvGMMPAlFhk+c/k\r\nep5VFi6v0Tfzs4EWhL+Nqodu7lWEJz0i376+pp0Ss7LqxY43hOizdOlEP+oo\r\nriXH5nLnlcTKMLivvqev4zSMZN7x8DjNEbIBsOBIOFmcPuXo/lHbVD207sLP\r\nDJYoOxXp8Ks+GV22+kqVv4WEhN4MbCXXurJ15csckfeoXjobOkmbcVNcczP5\r\n8efLdCbhai0wZG7VyHA4RKxzWAKTKVHw+Sgad2appedEFueRMMqXivSeiBdu\r\nY+cEX5oPCPK4y4xFsft6H5jhuzWFBkHe7ng=\r\n=Q4c4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"92d0020f1616b24273dd45bcadc1f36b47a690d7","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model.","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.10.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-92d0020f1616b24273dd45bcadc1f36b47a690d7_1669714734304_0.43812450946542714","host":"s3://npm-registry-packages"}},"4.1.0":{"name":"mongodb-index-model","version":"4.1.0","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@4.1.0","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"a8c4b998f2e8ea3df45eeb0cdb27dbee0b1cd24f","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-4.1.0.tgz","fileCount":9,"integrity":"sha512-OG3U+W9Se39ThjNI/eZtNF/EkEBwkM5WhhersWyXthe5KbFT/qMt09O1A0PKjWTx1NKLl6+qMlex6t/D0zUu9w==","signatures":[{"sig":"MEUCIH2LrvWa+H/rbsTREbNDLMvntIVXdnl1MJmHBpfTDKKjAiEAmWtDxE4S/p6GE63PC0XBXKg6SG/UKrpQophaPKkckUw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47692,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjhgyJACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoO/A/9EjJ3IpEwp+Z3MN5nodJFHM8/eDc1ZF41gTELcskyKfp4Nbaw\r\nDVuA8hKjLbglzHAFuCNe1zZUUH07Gip0cKlEe6lmSRTeX33NUBLlowHvuKXA\r\nVTnCwxNewz9iC7tu0boSoygryUH4eO+OPr+qAR3i/apXVHR7Y6cxMmd8RGqT\r\nsoRoel6mukU+4Re5TBKoRNE/Lm4e8wDrs2zltMRHLt7/gR6x68vLGVKHWPXi\r\nF+mPKfMeSaJpyNNz984rovmTYEWYJFDHJcIQvlr/oMJzlr3JYfRq8yiphN+O\r\n6ZYyfYRE+9hBvUO2hvtuP+ilm8aM91J4ubhP0V4/sstcQEcQLWfkCeQ7i0RG\r\naOhD4MMzUo/37FzOF0s0ImaCmtpTDYyv+ezw292v0f/QkOY8ukMSG6f2g/A8\r\nJfUTshbJhJ8GMyp6/Rgk6xg1Snr9lz/asEEdOJtaPZKV/3iCesAQm59uZYJ0\r\nfj6DZUMcSmJNMxxzww9irA1F0YfxY2ibcQVWeMP0fAcOUrKzkcJ+mptSQ/s9\r\n775pDcC8JkDcj/3mOlQDBh1h6T33skP56ivziqdjA6dPoleDcn5gg+AahM8M\r\nksQubfsQGx7sNH4PVsVFF6uBI//GbaTyo7R4K+fPFwLJxl/ucKk3UalUadx2\r\nfLQmryB6VZTkQomtVRDZi4uIWc9krrGjAzw=\r\n=fKhT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"7f786ed13b999a5c0831af6fde545154890df956","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.18.1+x64 (linux)","description":"MongoDB index model.","directories":{},"_nodeVersion":"16.18.1","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.10.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_4.1.0_1669729417184_0.8456488608460719","host":"s3://npm-registry-packages"}},"0.0.0-next-449f5b693a70d24bf653fcbd3719d8d88d91d899":{"name":"mongodb-index-model","version":"0.0.0-next-449f5b693a70d24bf653fcbd3719d8d88d91d899","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-449f5b693a70d24bf653fcbd3719d8d88d91d899","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"88adedc5add3ef6ef6c28e9e34cf2e94fe352d7e","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-449f5b693a70d24bf653fcbd3719d8d88d91d899.tgz","fileCount":9,"integrity":"sha512-z9/XcTSAkeE01mr9QULOXMiQgpuOmZzW96APi0zSIxvCSTTqhmrvSaRTu2Ag2o4Q0mYTjx6VN1kJLQYJnUti5g==","signatures":[{"sig":"MEYCIQCSPPrPgF8YgtmIdK5K1FHJKyHtOSZ7j7Ma9PO4etCyZAIhAOvUYUiT7Dk28cqKtwhzgJWNghvlT82RjSJzQp3RA45m","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjhpc8ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqIXw/7BToOnoGeVeejogm8t9BcYsa52WdDjfFjRBb962BBX7vngIAS\r\nn/wFDL5sqVYgfL112Bh3h77R5IgVCK3qM90JiXQxdm7RGVNX2sC9rZEU/FoO\r\nqBJsZ97I0QlPKXz+oyUfBzta1U8YCHffb7+NY1fdUnZoeHzIUc1MeBjPC66b\r\nkEuimQm0G+9Aa2gT1RJ6Z8AsSKTwA5ciDulI/7V+qNMq9cXdGmYH0HvQ4UDQ\r\n+u0xGcMeljATmH+h7t3QAeOAdi0MlVUbCrIO38dpE32XJLaoFW15gfb6j1kU\r\nGnxZXX6uZznWMUM/BncxGYQDkbIu8xwwO+TFSJpM39AuHmSNlaBKoyyof2E6\r\nv+XqeyV/aBv5l3SlK5I6982OxNsNMDdCt+gTdkfAWLwtICDT2nx/Mew8xUYH\r\nQnl7c7iHmlhx3QrDcNRF32R39HiMLwBavKg9+10VVDXx23OdYxdmnHI2VQLd\r\nLlesxf8azJLx46VdyRgfTqB583PzyquF51BmXweIPReDD4Q+JefqzrmUeXSf\r\nEyI7eb2uRzl1fU/1dxw3EcgW/0LsgUvojsA36QCLjnv8CHnzqXSrn1kWsa/3\r\nFEaaDbwR/Uvh+jRHoJFx+peCvGANVNYP0ziCXmSCAooWUjX4zjxnEspQhfu4\r\ncw5Pp7pUTnYIeB90ttGDeRbYY8ZxOQ/0wh8=\r\n=pwct\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"449f5b693a70d24bf653fcbd3719d8d88d91d899","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model.","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.10.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-449f5b693a70d24bf653fcbd3719d8d88d91d899_1669764923965_0.0320873424276793","host":"s3://npm-registry-packages"}},"0.0.0-next-9ee9b0963df24390835a677f1a9081d9bc53ca2a":{"name":"mongodb-index-model","version":"0.0.0-next-9ee9b0963df24390835a677f1a9081d9bc53ca2a","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-9ee9b0963df24390835a677f1a9081d9bc53ca2a","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"ea2274c9262bbdcc60d138fa70e1fa1939b5d683","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-9ee9b0963df24390835a677f1a9081d9bc53ca2a.tgz","fileCount":9,"integrity":"sha512-DAFCWTEHhnDJ847hjI9vqWeodpZTL3rQIVajd+lDwXQzxBECIwuJM7RXp0e9wKnrwfCXIzjh6xZpn/EJGiJewQ==","signatures":[{"sig":"MEUCICF0/yorILPmDd8gL7t0KBEBONcN8PkkP5ofAQCcvkJuAiEAxooud8D3lOBrY0pJfK+5NOnCegFt0OgHhwhoGeMBQns=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjhphGACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoJZg/9FmpAxg0+xeeDEoLwisGWn05zxpafsqYfeP5SY8gQcwQ2MiMr\r\nIwHJ2q+kC+5CL8aRCMFYuWVjCkJRTRKcEiikukwI72aTsmda9JWF6IXXJIyc\r\nadhhhcBGNUUlUy2ZyRWZsKceYt/KDx2D+dXH0kW94DCJyz4T/fjMvEiESv1E\r\nAYdK+YTeKb6xqhO6UwrljnUV0rLQaf7zRof5f/pKvSz2SKIWduba3MJSLpCS\r\nAvgDZMD/SPlgjEyOPC4rwajwHZs6K8UsuiHjT5LI78+E1QOecu11HcfmCOoE\r\n0hDNUg18t3PmaToVi96rSIFous6a1KwpdmpnenfIYxLuidw7K57aABjhdX45\r\nvLFEPSQJNQ9lvso41fB9h5KaHCBE8qQ2UuGNEFGL79KUgelqrpYIrvP5CtT8\r\nC1crlqG5oxlv345ZMxyoeTMp7ER7KyVuIMitI/be1s+jP72c46RaIrZazosC\r\n+mwSjSbcOro3OZyjRi8IiNccyJnuAGcMIQo+IBczqdiup/r62i4+IQD+GELY\r\nl4v11FVPFgt2AzA3yDA/N2f6oMNgkqhtu3kLaFpes+B828UpYIHOkR/4in/q\r\nHpF65jzelHCiacAeMooC8aamyCzIloPKYLghmbsAYyCkI5mMyAgyQHJ40j1m\r\nf44kkHyPQirMQhn0vTzDxVPHIlt0iFgRLcc=\r\n=W/fQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"9ee9b0963df24390835a677f1a9081d9bc53ca2a","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model.","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.10.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-9ee9b0963df24390835a677f1a9081d9bc53ca2a_1669765190637_0.5226892383235209","host":"s3://npm-registry-packages"}},"0.0.0-next-abcbfd525e6443433f1db3573c7fcb8067a4b2c9":{"name":"mongodb-index-model","version":"0.0.0-next-abcbfd525e6443433f1db3573c7fcb8067a4b2c9","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-abcbfd525e6443433f1db3573c7fcb8067a4b2c9","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"04d5ff3c1a1965f6e87871dd1196713fb1696349","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-abcbfd525e6443433f1db3573c7fcb8067a4b2c9.tgz","fileCount":9,"integrity":"sha512-aVD35a6bSuvdWGGbP+p5UBruqr1wAycBsByFmZ4mRbHYMOXzG+rjGT5am08H8jjhx4kak53JKLYjQTlQVgI5dw==","signatures":[{"sig":"MEYCIQCt2aX0rbS8s6ccMBrrj23+zRJ2aAM66goNorV9Y6fJRgIhAOCy9BkG39s+WLKJKTP/6mX5jzxcKQvwnlA1U/rPenSm","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47737,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjhuXvACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr8nw/+KCd8X1Ud6Ig+4b0vBWovOrzcZTCPNkp5nxYUmq4mf7gvUNuB\r\np3WL4ztw2BSxUekhUxCvBBxN1Gd994MdJHjS0kBZaR4RTlpS112UdyI00DmT\r\nS90pnqdPG8oYSKuh7qtL3Ky354NHsFwoZeo6ns+1+pazNLRneqRleovDpUaL\r\n8Z57W6KZx9+jtZE3B0o4s2rSsAEyvs5jJFjdCvH12Q2ljCOvdWWuIBl6TY0r\r\nFSl3K5EI/lR7fSEpKugL98i2j1x2Kjhmt261vLWVjD1fhSFq3J8C3YFtGB1i\r\n8VazvZaqfH01y6eAxkGnPSazZ4uQSbeCmDGZKQzclfxkON9rMDW3lRwlc+uU\r\n0O18langqwJD3Qs060DyUdqhZD2RhaANWxhV5nLTNxRpQr6EkmvRVESIqQ9Z\r\nSWbTarhcui0pNLpQki45YxiqpY0g4pAh6oT64KNkhpeKJHRjUUmgVcyeA9Zp\r\ntRry73fU7UzR0jl33wkp0Mt/9pB0HbfEb6ZopmqFA0qC/gPig1C3bjOeZKmI\r\n8LYRLuSFE9X+4qqLeezShYnPXETb3tk8V112lV1Fq9hUQduPiBwFm2YKCxG8\r\nBu/QYZnrjY+/pSAQKRFoaMw21C685i2sJ6Qf6ClxBtNgg+SOVPB4fVrrqjsy\r\nyCMhTD+4db5dZimAJT8ksFcWzg3btCHIyec=\r\n=zp4N\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"abcbfd525e6443433f1db3573c7fcb8067a4b2c9","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.10.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-abcbfd525e6443433f1db3573c7fcb8067a4b2c9_1669785070826_0.8154950587560106","host":"s3://npm-registry-packages"}},"0.0.0-next-98550b9ab2651e46658429899a0b7353249a18c0":{"name":"mongodb-index-model","version":"0.0.0-next-98550b9ab2651e46658429899a0b7353249a18c0","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-98550b9ab2651e46658429899a0b7353249a18c0","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"f8656317c6be5b9168836ace59bb7e586c165f45","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-98550b9ab2651e46658429899a0b7353249a18c0.tgz","fileCount":9,"integrity":"sha512-yHQD67jXLyi9lYWqVpYuMtf5B2V9cCH/m9Ma+FCOkvihnlUYcUQls2jUYM+v7VrV38+sFe/iQzRQoY9fwMcNvA==","signatures":[{"sig":"MEQCIC7NmgFYpd2Qq2Y/5uDosl11+L44cjIyb9emuYROhcYZAiAvN0lOu2jlMbC8VaLJh6eHM/1a2Wt0QinVWfj1lIbtBA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47737,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjiHgSACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmplsxAAimk0Eierp9MYKqEj/BtMYQ8qeehjJzcoJoB+uGf8bJ+80/bl\r\n19UtsSN79t+ebaxadP3SdYyetjvS1+Pvx98FBu0Z+LDl7Vd1e2AZzNT8gCF8\r\nkLKOtE7DxqxjlYULDI6PKrb/QniBcVSFLjJlzjh/PzOgswACcNFwJrByltjm\r\n5IHxlJPex05/5PILD1tB57BfUoMo80Ov/3QpeL+2b/8po43KyFMZ+uaqHmHI\r\nKCcmBq8iXxCK2g33HlJXPdE6O0pkI/bKGWd3G3DTv3ez2cqiBvN/ZU4pT2Kf\r\n2oG2yglMSfvkvTtudfC+lrve3pY2AR8jlxaXSBm8f04JkNBJH6uKxb9e/r9I\r\ndvbG/JpOReopfWerFcGTw5KQ5RajgCEdyBRUARLXaBIT7RYric6YsIGHIr0t\r\nT/cqdmAI+c2r7VPipGqOrV2UbeJylxDT/ghg107prqGEn/jyNHyXfPQEyT6i\r\nk+1BvlF6dLCtlh0fFwjZ0qW3fNJUoVPlXqh8HxRkJetSShYqPaPCdK3W76BY\r\nZStPBaEMjj7NCygZJhgmEU6G4qhHyNpvSMr3rlu0WDcjxb6dOUSGUq0HmqF8\r\nQhATdN+RxHRR7ned1lz4m099yVUCqd3gQtPEQmFbYUzPSpEGnbA9aCiUcjTK\r\njMet1UkBp75tz3LGIyUDOXSMT4RFRzn8svM=\r\n=QD21\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"98550b9ab2651e46658429899a0b7353249a18c0","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.10.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-98550b9ab2651e46658429899a0b7353249a18c0_1669888018533_0.4086439721931088","host":"s3://npm-registry-packages"}},"0.0.0-next-f5e96f4dde195c3f4c44fc6c373583df1178a29d":{"name":"mongodb-index-model","version":"0.0.0-next-f5e96f4dde195c3f4c44fc6c373583df1178a29d","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-f5e96f4dde195c3f4c44fc6c373583df1178a29d","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"edde644ebdebc39fa24b5ba5fa0358d00aa92155","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-f5e96f4dde195c3f4c44fc6c373583df1178a29d.tgz","fileCount":9,"integrity":"sha512-RX9iInkZyEsBhfSeFZOlaJhobBDjWiK7+Ec/64bEHjHqyLoHSMAdsnjSQ9ER/8DfNE+gfKAb++p6ggJObX8Q+g==","signatures":[{"sig":"MEYCIQC4XAjM4xcLQlWIethnlvGrTVlop8GXtHp0Sl4p1Z57cgIhAK+mZVIHLclG2iV2qagmHN3GxJBVLy9Ca+rcGAxThQWu","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47737,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjiTXjACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqEJQ//VVZxEo/paTmYc1/O2qctJ8BWWD/uDtHhvSheDUlgKMx+ZE/Y\r\nGq4Jgxdc9kNvuCZ0SYOtiaAio5TnpqvcvpWi0DeeE0UrEeJXZJBOEiBrG3xJ\r\nYDNP72zSQGCgUu73ryAGNtUxFXOtrT3QXsVrInpNZ6Eyj69z+hlW9I09NkxX\r\nAD2NZJKB1lck7+L5PxbqXlSuMowGmqEEw/ytWcqn7eXpFtZodkO0RsvCSHhS\r\n4Sy29M3W764F93h2qIosO1OMX8yW5I8KmV+N7IxVUbS5GSpZ1KYyqm2afvc9\r\npXwGDoIOgK61IxRMALzfx7VKuoXSzFpohsm1uOzO2ZsR0r+RPnG7EidruFMl\r\nXOxybW4uKRQHiL3C3uLf4ya5UN932WIf9iSpKYKV1vtYU/CeDlatCFjXcpGA\r\noEwzua6xX+YmJsO4HY7UW878kJVrvA52UhYMwT/L+r6K+u1UvukLSzOOzuGA\r\nM+GRlIslt7/udCnSnXpT6rQmyothLLST4ikgqjpB7QO+iIJZzxyo9LJCRbYW\r\n2vbs6IGvTwyWfq+Lloh0IqkLM7t1YyMP1lP/6sUhLEJ45qECXcxa8tnJ1ItM\r\nrvPCLR7DnBExBxXVfQDq2MuNKvo/rd6e++96NrMSsDnuW9rf29JszCMCTTQl\r\nePF682zuMEg+m/KCFzc0yhpgcIS2542u970=\r\n=CuHA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"f5e96f4dde195c3f4c44fc6c373583df1178a29d","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.10.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-f5e96f4dde195c3f4c44fc6c373583df1178a29d_1669936611261_0.5430685295223885","host":"s3://npm-registry-packages"}},"0.0.0-next-21edffba0b9d147d7a297a3e4a69d68cdca09b82":{"name":"mongodb-index-model","version":"0.0.0-next-21edffba0b9d147d7a297a3e4a69d68cdca09b82","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-21edffba0b9d147d7a297a3e4a69d68cdca09b82","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"2dfbef0c3373a8c462f7b27b6be941933f08d2b7","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-21edffba0b9d147d7a297a3e4a69d68cdca09b82.tgz","fileCount":9,"integrity":"sha512-xpP1iwgX1j8kiciBDqQIRh/WlkUqlUVNQGLkA8chJ0H3SEKjgClpxpvTau7HxxoCXk8+lR4CTf2WBn2gv4rm5g==","signatures":[{"sig":"MEQCIDN7jQ3E/atYZcXfNPnZzGEHHbbVU3kcm0IxWbr8urfJAiBM/DDN70UZuDl3TDyaUUNmASzUNQZt55q2znP63zKEWQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47737,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjiTidACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrj+w//csNRfZQWWlF/7zWudJzGDwJCMT/pc7/+UvxuodH1aDcs4W6B\r\nOdy7Aa/hTFqiXqBWq+s6R9hTzJNZjVL6duDuO/TbAeS7y2dCH4zDSdpsn+Wn\r\n1RgerzELqV7fOBU47OBDXZ8ilj7ib9jom9bpeFK6jPmVpxwLZd1BX8j5bAuL\r\nK/TT6jKPEAz/9w+uH4eMkPYMdweNzDGQrZB5POHzqtxcM10XsDnZiI/j3EGL\r\nsSHY2xEVHEc2g0GtFTM3X/hmcTw62Dl+9ZCRvJBkQsw7JfPpAK0tnknFvZfN\r\nsVZ0CoBhR2fhiRu/amQOr1Q+rf+ZA2vgZ2fyZnFNWLx0+AGYrDZFHYbWKT2u\r\nFi7aFRGRgSLuNH4PObPvlLHi1cIs3LnXcsEQMe9vJzpSUiIjbsjcQLGvMle7\r\nQsqT/QRa4ECGQNKFBbnBooVRsNPr3Oy0wDdEqmXx1FkGF5ObCSvvURvcnA7m\r\nm/DgbByzY7Au4Br84HM0W/loaif/xRD6hnNv5xfLNUqMU7zomnrjDz+VZlzM\r\nZFNJdGmsAKZkQ8MvZYer5NfYbQJHR1TzG7Y9G2lTp9bUv1P9U9XLi+NKNH3z\r\n2XpBKqbRXeQHRwJoSkIJMXBXRM8iI3y0CP8USgnKKdOI7Q3JXoZgiYqXm/MV\r\nZUpIu6CLd/6weM7LSbh2y271BzdEXPlVzVU=\r\n=GogK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"21edffba0b9d147d7a297a3e4a69d68cdca09b82","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.10.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-21edffba0b9d147d7a297a3e4a69d68cdca09b82_1669937309341_0.6153160770058834","host":"s3://npm-registry-packages"}},"0.0.0-next-6a5d526328ecfce1da82bf064daeb19f1c2bf6a5":{"name":"mongodb-index-model","version":"0.0.0-next-6a5d526328ecfce1da82bf064daeb19f1c2bf6a5","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-6a5d526328ecfce1da82bf064daeb19f1c2bf6a5","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"4aa01fc02ea2c5f9119a7028567ecedf7aeac0f2","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-6a5d526328ecfce1da82bf064daeb19f1c2bf6a5.tgz","fileCount":9,"integrity":"sha512-hu3JLXemuM5nADbu7i1toAZZ8AIEhj95DgIYVFzTntp7tTfZDEe1pD9aFlc04ut9TUlVVNX82tCeXya/OYWymA==","signatures":[{"sig":"MEYCIQDl94/5pbMJ279zVKMwEf2G/56oLALFUD2MdRWVdNGSAwIhAOdLDbZ28OUfw4KC3Wlz3SyRi7zuDL/X51DLoCCkaKUA","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47737,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjjR/DACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpmBw//QTcjy791k+jk1tSw7wl1eDpfH1FW791XIsL0eBFleBAO9vs/\r\nbrIW2FbjSaKzQ7ymLV10YVw+cg4sCOQ9yjGq9ZYi3gvtdErodJ9gsJHHgCJu\r\nsZ0n/+T21TE3eyE6M7NuweRRwiCqg4xoLpLEyoeaXh+7o8ivdXaeBKxYmsn1\r\nSLR4RXHJt0cmduxk+0y3twB+1QELcVNHT/WW04z4Yp86fCe9Pp9BqGR3kRdC\r\nLUKKl5ZWrptxUP5gzMh6HCWk93RjPjrBICLGVagpIquqqpDtKS81qo79Mj1r\r\n/eiMzgpN+PGUIWAIqEiu1c8G+xydSirqbq+fpXszD4c7X8tHeBi8lHk9Oky2\r\nFnOPoEps1OIAI1IgojYEALPq2Jtp13RQgyyCCbi3k5ByMQf5HiEeHc4Tk851\r\nU6VmhmO5L+0r0HemCScJad1dTrMCV/6hcw0ZPKf3dzOMeUQFZtMQkCA+AKVd\r\nTlc08ByH+ZiLSH9y2JjXouPuQkZj7nrQis3bhd6Qsz2uWzlJrpjs1U56dYvn\r\nIid+Ml+VxSwNIMhI+Je0lfwgIQ/Q3Hcq5O7YmzQ+M0WPF94Y71pWt/pdepto\r\nTPC6UEliQdr7d03bdDzbMp7zpnazIsbVZrnOg69/o1Q2qQSh9AgOoyXBZkkO\r\nkjcO1XUFoF8Ay+LxxS+XnHqtwlVJf575fy4=\r\n=b+1H\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"6a5d526328ecfce1da82bf064daeb19f1c2bf6a5","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.10.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-6a5d526328ecfce1da82bf064daeb19f1c2bf6a5_1670193090945_0.4740486910136785","host":"s3://npm-registry-packages"}},"0.0.0-next-aafcfc5ac487a7962baee26ca6c5870e66de2533":{"name":"mongodb-index-model","version":"0.0.0-next-aafcfc5ac487a7962baee26ca6c5870e66de2533","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-aafcfc5ac487a7962baee26ca6c5870e66de2533","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"9bfbaa46511bde598664a1301cd632c764e0ef31","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-aafcfc5ac487a7962baee26ca6c5870e66de2533.tgz","fileCount":9,"integrity":"sha512-qW1hvJz+LdWwGLofMAFNn/RuNvgEFMqvWlPyRdG7jKtrY4qJ6TDU0zA2kjtLnJGR6nfQOGZmZnABQ9vBF7yTBA==","signatures":[{"sig":"MEUCIQCzimOKlFq704d/P2lEQq85tVLsNMM9gRlgCJT9IgFS0wIgDpKIhE20BdcKfKtbW55FFUbzirP707kePRofDzB9aTI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47737,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjjbuQACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqcbQ//cCstHi35TprN+Zy79bYNENyr1R6zgnmRz4XVzcaRBnOM3BrN\r\nsRD0XS4qUnewXiFb/rV8IvTmmshu24gXReoqNroeOCe+mTOUSEctdphMJGv5\r\nMey3X83wDRgs+6ZZ5ocaK2/MFe7I3hKkrV4EfXSUDViib5nqWKnOLQlB8SSv\r\ncfTSdS8ITpqvrDVUvxHPCFqOLkY8rBf+RM+0mhdX9977wmDRKD++Hxd7fo4J\r\nwR98aCoXtsNz8viIMSfj2NBXRrJfr+3HCqpXwYrHFc6Vohoqiin0q2G5xSsU\r\n47CrzvL+zJAfPVb2YoCbibpNqm/McG8SHWFwPhe5cqtxK5cyZZSjBpFXFQ2Q\r\nXCNKlnZXFD0VsIn9v0rrJEoaawQQYkTDKCtKj5Nyq3Z94Z5j68G3J6CZ+M8m\r\ndU9UKVaMsxj2IpYj1xz6tKLkxeiYz9VY84d2NnQe6mFRWxp+qXQk2Q2KXEUh\r\n6FTjKq23afizOd0wWdTilITm4oPsP0g6mcac4Je0uKKCvbbtSk4sfPKRxT6u\r\n7Z438dvj2/ofdhaRebBJOpS/uHm6s9Iqkhe+ZPoAOCWH3ExCcFVGXFEZZNkU\r\nQuRSDl/BsHNmlEGi3y3USVb5uRoAeZpK26r/kb90mklB3DGiYrjylUNudHbR\r\n6n8bYSJ33APi8GNBody4ik/Egzb1hURidTs=\r\n=F+ha\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"aafcfc5ac487a7962baee26ca6c5870e66de2533","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.10.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-aafcfc5ac487a7962baee26ca6c5870e66de2533_1670232976011_0.14136018217963509","host":"s3://npm-registry-packages"}},"0.0.0-next-2f189f8218b434e8d36a7472a2ac843f17147b9b":{"name":"mongodb-index-model","version":"0.0.0-next-2f189f8218b434e8d36a7472a2ac843f17147b9b","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-2f189f8218b434e8d36a7472a2ac843f17147b9b","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"5fe339dbc4427944779d93928836799d66043bc1","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-2f189f8218b434e8d36a7472a2ac843f17147b9b.tgz","fileCount":9,"integrity":"sha512-5PYq1CYPHVlB2KVGrAn1ThMUSAdXsFkPEYGXw3L8eNd4fs6qEFvKoPYm5xo4YjoEleVzDbPgNPXRdpzb3J0goA==","signatures":[{"sig":"MEUCIQCLfoOicNAa+vkbncPTZMRBt3zH7ScbasfAwn6rekM+IwIgVSJRYKayOj05dNWUWH5wI4kt6jh0PUQg7BL6LJelq4U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47737,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjjpJFACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmploA/9EV2EUUBfUHUpi883PVkqaLLnT0yO9xsAKcLUOa0yS5U+RwcH\r\nTWWIsmCRxrJESAMFwYS9NRy3YTgP/RX6kPDat03zSfpmnu4kqXp14EJ43xvy\r\nWOQL1C1OfQ1w+9gUiIyRvmmIoWgbsVB5FR6CR9mK7W7srOM4IWJS+MVySzi6\r\noPpU2zbSy606ZhxRmzNhMNYga4bEt4CRD98LzzJJgydyYsF0GLoHjP+qzc3S\r\nK4FKi7V5m32n5Zh9exyrGCo9xtki3jB47gW1jfUioZvwIYCBRXPXJ+KXW+18\r\nEX2gMnED1QYoyrLWpdYw1VmBf1v28RwQvllWQAZ3UD/LRZA5ZsTNdxFmZSrx\r\nsdwbBsGsD7lcu4wKRyOYwk/S++xM3s/QdfBw8nrCzm8hjYMIDt+t0Z6VNo4S\r\nnZPWf38W0elilv9SkKrKGBOwfvMozxyZaGoqKNYTzyf8hj/tiZKtXAjuP5OA\r\nk4ZVf7OVXJKDDQI2Pd07M6LhGq5TIUGiZBq6tyIPGuxmfS4uaIs448ZVowpb\r\nA1wmYbZrUeyoWSrCo9sTj3qMilm9nivXfEygxqXRL67FCPUCnagO6gOKsdDT\r\n5Bv9rfh3iZz37FH2DGQgGcB2KTAZjERIjDqNpQjah7SOiBr7b/+gssjV/uj7\r\n8f6WiGclNPm486XnprMFZmu8eCmX0EFGCkg=\r\n=Ybuk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"2f189f8218b434e8d36a7472a2ac843f17147b9b","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.10.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-2f189f8218b434e8d36a7472a2ac843f17147b9b_1670287941234_0.5744236101838678","host":"s3://npm-registry-packages"}},"0.0.0-next-faf899c161858cffa138dc64f4fbf9c0da2145e0":{"name":"mongodb-index-model","version":"0.0.0-next-faf899c161858cffa138dc64f4fbf9c0da2145e0","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-faf899c161858cffa138dc64f4fbf9c0da2145e0","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"bebf04044b469ce4d4f4d2f85f8a4e9abecbbbde","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-faf899c161858cffa138dc64f4fbf9c0da2145e0.tgz","fileCount":9,"integrity":"sha512-yibCtighDW9r074pykZx6f0to2TVls8gl54nX2UO91HyC8RjaOl8XqTFC6mdachaJScs/ayzdvxlGEeCQoMPcA==","signatures":[{"sig":"MEUCID0+y3OaFWpZOOYBc3GtQoqI0UTlQTky9JS17oEv6TWkAiEA8pHU+WLWpjWYgpl1ulAyVMvXOLM1/sa5rmh6LN6cijM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47737,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjjpKqACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo4qxAAi2eemzgaubUh3SBrFJWdDIk9dwKSmN5v6cFDTKxKVikWa5b6\r\nVSl5W9ZBqh9DiNIB6rigdCHsR1kB7fKweGhD+zZzb3wc7iaZwmhe5mR3OEBM\r\nlxR73Bd/CJzhgt9DDEzCz/S5DgJRPUdQf7tIQLo+6v98kC8nV1eu8laccOH+\r\n9rEaWTeCU2Updn04JItX4hycScNznNChlI9ZRe8FTpgoU6xM3MrHQVRvCeuY\r\nufxUHWA+qNMvwICS1U20lP+OOoFoMCwI9uiyoZOAyzJeabUZEkcFPP2OW09r\r\naqxmCq6VocYlh4rQgM6WCG5jKL3LBvpm11+8yNEhcoN3RaG+nNGpNX6kpJcM\r\nhKT7niT1vt/7DIM3cwwIT46qISk7LlfjGHAEn6Cjaw9ufBp4EIzNYBOOqTi2\r\nsh8BvmU8OJlWVzqLIg9QzTvQvEBlk2nVgf3bZ+gZ1Q1T6CPqdeMZaVKqgcSi\r\nvA2bo4B6NpNA1HVskrY6J+k4gdA83bWdW+qTYNMxZNpzD28azS2qcKMgg/ZH\r\nMRLL54wSrKGnSV/7B/9k/iexj3nxbQFnyqjZMSv4SIjQc5GcIC06QGeNdwAs\r\nvBXMpArCGD7s/Fh0XLiIidv9xHPOhyIfqAcF2X+9w3S2rI8iKbyimvhTNfmG\r\n/nD3osQ+5dhm1yMhKHMHwaPaOLIPEwGa91A=\r\n=Sf+f\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"faf899c161858cffa138dc64f4fbf9c0da2145e0","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.10.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-faf899c161858cffa138dc64f4fbf9c0da2145e0_1670288042587_0.9093630081311579","host":"s3://npm-registry-packages"}},"0.0.0-next-f5d7198f71e9d27890af5dc79d01c3950c637d49":{"name":"mongodb-index-model","version":"0.0.0-next-f5d7198f71e9d27890af5dc79d01c3950c637d49","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-f5d7198f71e9d27890af5dc79d01c3950c637d49","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"c04452b4c2134520a947493181f8a4ecc5b96d57","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-f5d7198f71e9d27890af5dc79d01c3950c637d49.tgz","fileCount":9,"integrity":"sha512-LHITzZj/3e4SEYKNETxUtNUXyHjzhQqVheSy/oEV6v2P1NXwB/OmDWiD4kl6WsDlbC/4E9lfnrBIKnxXdIXBqw==","signatures":[{"sig":"MEYCIQC8Qth0A2efXjtF4LvYcwanQzYcTDzn3bKhinOqKTtQdgIhAIJNyySNLkbE7SZO2Cluc/qwVQncFeCBbAT5WginQ3oR","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47737,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjkMnZACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrPag//cxopM4tJdN59A0eNK1LrT+ol2Rz5TnSltfXXvYZQFLNVEzCP\r\nEX1xQ0SJz0FjuFyu5LYXZPd7A4T6xysYfLwH10EnBh+9ulVt9kyNWSbvW55F\r\nmsSqe8Uxx+b/9dsE/hdoEkqFdqj1WzmQDjLksX06uvQOP1iw+qsedbXUmzpt\r\nJ51MFvRR/SV3isx+iHxFzliOubC1XQgtGZhlt9gSNh6PJAl5fSHPuOuShE9V\r\nfBETpGiuMmKE5XP+nxhXorRnzRevX26LNyWWBNhqfLg0+pFQvKWhTZHAVcUu\r\ncJL444ZHOChUSlOYpjDEDRB1Q3GkpBO8LCohAXtT1XbFL4j/khtpCoPrknWp\r\nw2FBrVYykUDLzYxkqW/3AFaxYDM780tuE3AUE2fEKMQ2lmTnGvrgBJEJjbrA\r\nW6ZeEuK/dZ0zNI+sKJ01U8u5Y333XKkoICvrj0Wo2PmSxFrSIu/XcIdSMtwE\r\nhkAQlRQXJ3XE0jVC6NeBxMhyGVqs+H7nfEMUs2PeF5Dk0R+zlBsQo7wGacSk\r\nPu6IO6M079HbExu6NnMREoFdP4GB+qLa4uwxHAo4N5lm356lIYlSEX93Qb6c\r\nj6AgBtpTk3orgtLHuaQ2N7VW/Bc03Cohh2wWLVcXXbzNdux0Al08n6UXYxtB\r\nJAKcOhAG1THCjCZZ3Sgya+wTycmY6gUtGQ4=\r\n=VaPQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"f5d7198f71e9d27890af5dc79d01c3950c637d49","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.10.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-f5d7198f71e9d27890af5dc79d01c3950c637d49_1670433241212_0.8874597124363233","host":"s3://npm-registry-packages"}},"0.0.0-next-1336f6ccd01a8b5f63ed6bea289fa9f8fc4d9557":{"name":"mongodb-index-model","version":"0.0.0-next-1336f6ccd01a8b5f63ed6bea289fa9f8fc4d9557","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-1336f6ccd01a8b5f63ed6bea289fa9f8fc4d9557","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"a67c861ec6480d2e86dd511c3c224c4fee49fa9d","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-1336f6ccd01a8b5f63ed6bea289fa9f8fc4d9557.tgz","fileCount":9,"integrity":"sha512-25ug7lZjdZa8UpBxuhJ6S4tlWdHOrFgTugRi4G85MYNQvbw8iMnGPN2FTQkyDvDYhybFO6FUw5ZI5xpxm9Z6Hg==","signatures":[{"sig":"MEQCIEs+gYUPNZd18Wobzd98ZjUqJQmXp2x30JQZGuS8KoqBAiAyj1NNRpUwG2SeZT+2+vLa6HFlH4dDqhb9zUYsAgaq4g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47737,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjkqECACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoCxg//SGq1ukrRPcAqaRTkvemuP8/Q7A1X9j9B5uZMBJVSXkLumspo\r\nbgEqACzR6CBxfwY6cvDgrOWh6q4njszyRxUz3FJlQygR01K1LzkvmW4YaSgS\r\n0ugxiJecBSe5+N9DAzX9+/lzHgrzcZd523nf26ey+hmfpT3rR5eYH9/xq7Eg\r\nX+CyXB4096JfsMGZDZLc3X3bgJjxYO3IKd4P6EaOcXOd2Q4oyZX8OA/k1zWh\r\nOqAtVMBM10nFaB3CMHqA1ZC65DjorGYq70348G5Y388k+4K0cXbI0QLSgrLu\r\nGogH+xHhg/mX+4SIE1F2csWOPug53pRrP0DaDjnimTiN+0qOmgz1npi724ju\r\nlLGO42kHVI/HDzCNGtGAB4JgZ5urZWK+rP0ppZQCZJGuYVlWA+Dy4+6fKF3L\r\nnQY/APp6ueG+PV8xvto+yfpRGTGgS9xwASzVjCRCUA+mHlYiDNlg01hy6BZF\r\nm2nqRJFVrIJ6LoeBt1R0xVN3l5k8tnVG03v+8+0f121nlCwUTpIxkYVYu7W/\r\nYaFRLATzgvtsfiFI2ONPdpZv9PwJbu4txtxfYMBDnqGDByQaIzn3UZIT9EqC\r\n1yZ0+Wx9bdMTsd3HGoKF3bMDdp+SmNmNxTMIR4wE7Ucvlfz5djjjUWq6wcEC\r\nGHwdn4ot0cbBuFS1oKUCN6XZ+frZncQyvOQ=\r\n=cFzA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"1336f6ccd01a8b5f63ed6bea289fa9f8fc4d9557","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.12.1","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-1336f6ccd01a8b5f63ed6bea289fa9f8fc4d9557_1670553858243_0.6201597424340888","host":"s3://npm-registry-packages"}},"0.0.0-next-d43728ce0cf99f511bd2d2aebad966bc49276179":{"name":"mongodb-index-model","version":"0.0.0-next-d43728ce0cf99f511bd2d2aebad966bc49276179","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-d43728ce0cf99f511bd2d2aebad966bc49276179","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"de4d6dde2c9b66c996ed8d1d9b390fe83ac52893","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-d43728ce0cf99f511bd2d2aebad966bc49276179.tgz","fileCount":9,"integrity":"sha512-/Hul6P0V7/xUkHqxqdWBqT93PW4O1QZZRKUU0NKJhBFHm99y+A1iy6Ymryc+LGCAqCiMejgPVC14142IxvDT8A==","signatures":[{"sig":"MEUCIQD2eGHaYEwjVXB8y1pF5vdLi0gZi/SkYEZfLEGBXDfDtwIgctqu9SWdAS5VduMWDw1VWAMtdIG/irqRHMhVKKh76/c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47737,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjkqGUACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoKYQ/+P6FRSAIVq4lQ3hyA3oSNrFedEcZIi7Bf2XoxhNFabCetoaTJ\r\nOMUyFLMTbHH/o7P/KsmmccpJUxSFQlrlOxfqdzZ+V/3hvVRBa3B3wvfH0B6T\r\nREePCSJVOOLvb1GvW9XeBcIfORFbKricGbpEe1r8sSdyQDOVC5fbvYX6a0Kd\r\nWBa1lSAdGXs78j6IMDgnw/mKmAwqE/BERO4VzG63BqzuauAF0REp+PrAgrkL\r\nUMJW0WlDY5vVtQIgnVCMZfKEdGazRmi8VMwAkpoTpPfrAMSli3MCjmX5wOl3\r\nvIPBqr15fkfZPNt+7PdvGR3xJj1OzbGMxO3kLCqU2i0TmUtv7AQcQ9UyZKQG\r\ncvz09aoum5TGN1oXVNoPrjlcvVwohzlsr7/m9j/5gebq4zpKhzpfo6Uedjib\r\ntnhgDm4rFOmXuU/Yp4PbISbVlYa7f54YcHPRTx8ha7CvPzlH2IB8Yw2L9wD3\r\nOkGg4ZctH/qaDTDPjMZcBBvgZzjKjBXp/5ztk8P/gMz31/vFXWlSzJVBxXWZ\r\nIBd09Xo+CjW/v/XDNsizagw3a+0eiwiX1sUuD07ZFPgxZOGHK3CmEaAwBrCJ\r\nDc7eT03tpTJbsbTr0Lj0BcD9d4WuPUX1QXmJm8kFwIY3x/BaessRUNzp6Jf8\r\n+pK//I8dYNhMVfbruRACZF9V6bbYHBqzaeY=\r\n=pKSR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"d43728ce0cf99f511bd2d2aebad966bc49276179","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.12.1","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-d43728ce0cf99f511bd2d2aebad966bc49276179_1670554004047_0.6374654983867918","host":"s3://npm-registry-packages"}},"0.0.0-next-0d9e77c42a99b49fd4ecc7167d0c769866f92ef2":{"name":"mongodb-index-model","version":"0.0.0-next-0d9e77c42a99b49fd4ecc7167d0c769866f92ef2","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-0d9e77c42a99b49fd4ecc7167d0c769866f92ef2","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"e0581f0143148ed41a48818f9592b2a4b0c47d36","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-0d9e77c42a99b49fd4ecc7167d0c769866f92ef2.tgz","fileCount":9,"integrity":"sha512-pDGnCeEXOxcYTYOqUKSqfYIA7MzdF6fNmvJhB/3Jlu1X4JpS6svKYWqDfUlgVvqz3258qgvvT4P+71LwH8sLDQ==","signatures":[{"sig":"MEUCIAqW1ABnEiFzXycg1aIkXwRiAU7T0/50u8rvSMb4qdQWAiEAlub5bxKeRzkJ2tY9FVx0siG4Hulsqv5ydZYY4z8I6Kk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47737,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjkqPXACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpQmA/+KpI+LZt6Dd/ZsFGR74XUhJmPQG+HYxIA0eq2qK+q1EraGKET\r\nVO2rX54jhkMs06d6EFXQ+CTseLFZhh/j9PFFqcGxOqJjhz23t+C0rCePik3J\r\nnNT+FOIG3PVpW7lv0UUHcUHfLAUEFSjXfI4X6LDbZKcWBu/JT/jbZ4qkwD71\r\nwGnAFBgNQnN94SW2sv8EpQNbdySi+hiI7BgMiSHVGyrkzaEpm+DsWDwg2eOJ\r\n5E+1NX2JRsouWICh5ghrxulhLwOnchrUMaBxX00RlMkp0ei573rv8lC2rtPp\r\nO1kkPeuX3AFAZFxcveugpoQ8ZCr/R/3hLbiRepempzPWiVrwiaXOYF5Ai06c\r\nvLlGm5KpG8saPCXS6Ohj5vQZ8qEFJKq21ALRd2F8Qn+Eq2ZtkAgBwylX4u5F\r\nEIIsIkUclXW6CvvHDmTP+chefS9/9Oyuz4tQqQnaU0gXieOmcWqR/rgrn51j\r\nJjNf3DP1DB2FC2N//Zm25RO1hEU/veaJs+MLQ/Pu+OkJiAk55NCQbVJPCDoM\r\njKCv609it+nAYM3WDa0LWy2gTni+Dch02d5FN2eQaee4qsqCxAMeM7x0SB5f\r\nyFuQ/DijeWIHNeiYv8JKQvKMCiU/u9UPjAoODVAXyCMpVyn1jPZ4fwBXc9XN\r\nxl5ZhKoO5RmRksAQ1YpAFFVS1JFzaWexfT0=\r\n=yV0Z\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"0d9e77c42a99b49fd4ecc7167d0c769866f92ef2","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.12.1","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-0d9e77c42a99b49fd4ecc7167d0c769866f92ef2_1670554583159_0.9948992232508425","host":"s3://npm-registry-packages"}},"0.0.0-next-ea6948309aa5e3478e4cda811ee6de9e7d7e0827":{"name":"mongodb-index-model","version":"0.0.0-next-ea6948309aa5e3478e4cda811ee6de9e7d7e0827","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-ea6948309aa5e3478e4cda811ee6de9e7d7e0827","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"cd74be939d025dc6da807c82175e54e9fc8d31a2","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-ea6948309aa5e3478e4cda811ee6de9e7d7e0827.tgz","fileCount":9,"integrity":"sha512-H23vL9NujhON9rwPTEOtY6hzBlG75fMkRB5PIjjHwSIxGaELtOhIVB7eGHASYwXhUpMJzGs1C+3kB1KPHTgvbQ==","signatures":[{"sig":"MEQCIFBQvMPO1w1FPC722zxRnlv7jllfhpA03nSqp4URo5QYAiBFfS7Yu2INT6OEM0+dXPJc6+ZKg0PHKNI6u4NenIW6JQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47737,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjkzctACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqD2A/+NKE6eo/acQ1eLQ4ZAtDoHeBjD3zzEUs3KcubqRKncoVzZok3\r\n5mZ1OoIFVwsZL1F3q9Dn75CP1TYhg8BA74JxYu8Bp/EDSNCSVHE+GJhaRDpN\r\njV2OXzHKVl8fcdsEyi/ImNtbYeaSJJY6RtWehn6nmbDAiwYeTgsxzJoZr77H\r\nwgzGFdtUdNSDZ1ruDHjEpMSePymTO9bJwADheUjpvI99ONxP4JtOPzYK8Gyi\r\n5x0S9ZG53Rd0mCpIzoGlWixzUuctGHYi9ZouH0YA//6sr9PsVHfkW7ZBM0LK\r\n1dDvlI/oowa1bb+VKEuG28roo0ILselywPr9UU2klvKwXFIrQeOci/U7+OFK\r\nprSymXOBW6nwqvDQWgaHvuDSqo0Tl9WR4cDwTYIVNUMsAjlt7wVjAFs2bU5f\r\nWUeY3jHkLM/vbi+72V5gF7QEYwKW/GNCBQp1GCPFqZk4LYTqnwKosbv7C4i4\r\nzSvRcCBXBPlKiBZSa47fQwhE2ERsSTJtS7ANqo2XaF1pJXHBjt0ITCQ/GHSG\r\nsp8wWtbhrErcvaT46rQU8gRZ9TTsXbXuIOJ7UACM8fnNyYi82PXilLCzBj/D\r\nnppczQXxZt2kLbcfP3K4WIX7DKKvyHWEN9Mp1/cmHWd3RGjNe0J3G8/bgcTo\r\nRjAfaSMLmcerXqbYQdXgkvirm1XuEUZEXyM=\r\n=Mgzl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"ea6948309aa5e3478e4cda811ee6de9e7d7e0827","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.12.1","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-ea6948309aa5e3478e4cda811ee6de9e7d7e0827_1670592300949_0.03659485498461956","host":"s3://npm-registry-packages"}},"0.0.0-next-7db57a9d912a713312c9f79acdfcde9e49b554d9":{"name":"mongodb-index-model","version":"0.0.0-next-7db57a9d912a713312c9f79acdfcde9e49b554d9","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-7db57a9d912a713312c9f79acdfcde9e49b554d9","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"eb49544e7042702661effb7429678544cdf117ee","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-7db57a9d912a713312c9f79acdfcde9e49b554d9.tgz","fileCount":9,"integrity":"sha512-6ak39Zh/PSAQj5xYWR5zwKuVECooksuF1ULyhMUJmsjbosYiKiCsBbY8z7QQpNQCr8BkW3a0VRIotOhOSllahQ==","signatures":[{"sig":"MEYCIQCYXh90z9v7/bGv8kyLrf+uGRu0ChE3f+TE8J1SQQxn7AIhAMItP6+LgkXtG0w5a5/8KFHt0m3tZcpXMtYbeeLqNNJ0","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47737,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjk31UACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqsVw/9EVsvBwJd1KcqALKtzpkRvOK+cwsaPEcGYyyuSJHir+8vQfmG\r\nWK/NwemU9ugm99ZUzy5852LttFVlyc/An4PraKehgFIKPyBDMddZsoKjjqLm\r\nwac3E9oydzRg/lfJ/HV48SMVHAhucopKxgDJQv+m+MdxaT/Y0BuUp/XcI5+M\r\nxHeZn4mnwm6Ca95FsOkkiqi5aTMqD8+YNkQrxQP6/xjQQhfv4+Op8f6u4LwD\r\n5Imy8Z7mLhRUHZ6Q21yhYhGNX02claNe0snmoZrEdeV+bQksDiQaEDIcbVaU\r\nuLwVO/M93XO89w/KN/7FRXLNO/XJ4hCVa9IPoj4/zPT2OfM6vjH6lS6RVbNk\r\ngi9dGmCekw5vHvxgpM2CEECF1966sLxiQEsbuiBFWSgAgMDjFrOT5QWQkpko\r\n7Q9VTSTpNv4UCyGqi3cxP6U2TVdIaxKMGS9ECzRiQwBbFP12zF/ZN2tiH+ZT\r\nQuWZErCR1MHB5OgneqnhH7y2qdFVqzYb4AVcZGq+qJ3zWswqy+rvTC6V1jmX\r\nuv7lK5gF8RIKBQLlp5z1P1Sl1PQnRPDzZLXep8kT+zQEanHwRxXEKd8lr7Hr\r\nF65Tp1vTaHo8df0R0eTgmYShn46tzrzmrzGOqW50QARXLlFoct7egsxXEz3E\r\nvdx1niUlJm2o6bsE3W4sQFRUYAu9+uUunJw=\r\n=jM9V\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"7db57a9d912a713312c9f79acdfcde9e49b554d9","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.12.1","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-7db57a9d912a713312c9f79acdfcde9e49b554d9_1670610259925_0.9629051877561303","host":"s3://npm-registry-packages"}},"0.0.0-next-907430527b638cb96704541b347715ec1dcc648b":{"name":"mongodb-index-model","version":"0.0.0-next-907430527b638cb96704541b347715ec1dcc648b","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-907430527b638cb96704541b347715ec1dcc648b","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"b4bf484056bba9f0307d9ea50cba1e3827faf7dd","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-907430527b638cb96704541b347715ec1dcc648b.tgz","fileCount":9,"integrity":"sha512-ra4YTLpKmjt/7wVbOuDoWOe8+qYYKPdQnXonWy2fqU5Pqx092/S9pSHD9Q6GIkU0jpqiomgGQxQ9Lhqewz8RFA==","signatures":[{"sig":"MEQCIHvar2/rg6KSVPCDMXZR2UCQMo59CTDSlOwjIFJ9UHzeAiBNYCeDKrNYYSy0JMLArXVRqF2S0/wszcoUACWYe/s7fQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47737,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjl54QACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq5xQ//Sha8NFnh4b3qlgBGu0Xrdwd3nL868IU2EsCfvsUs/5E+0j5P\r\n0grbF7+psFd3th2nQ5khFy8K5fhWGI/ugNju/nIWJEf8BK4OtwSFkHHXZfDL\r\nSBosP6hLqGIxxTe3WFsmqWQS2TOVBcfeF8CT8DkHhMcWnI9UibNmF+o/BSpU\r\n5yU600ayhw+e0VBYBJ9kHd18yTjOvlIrU1Em2WDYg6Z9w73LgLZF+dHr6Xel\r\nD9HFspvJv4C+sSqbafYeNuC3mANpChjTfpQiQQHjCym/ahIxVdfDiazMGfXJ\r\n87Y0JQBYiEiccuASydZGnkuxMjh94bWc90NFVwnDwbgAOIdrzgDFCB/sVZbn\r\nS43kmH4WbiSWYrEXupu0CJjYbfC5a1SEIX+NspkAVHLN/2C7NRsb96fX9ZM5\r\nRg4b+r5tUAG2Iz11ZSJGNHLVJPiib+hDENqtoHKjZ5U0zovXZx1kYBc+DDwQ\r\nPbu+T9KKr/T/NMF/qYL4pIoQ7UWEJg5LVBHXn5CaflwDe2yVIjQZZJZk6Tl5\r\n7Cd8+/Gdwpluas+JuNlsfabOREh/5zHdPqQKlqyVnrKvR99f+y9NWgKnKnEp\r\nO353VEgH54U6WBIInSORG8SpcFqDED8lZLh+/M691UsnZpj1t7I//I1g5XFk\r\nFPdWJ6dM2kpJI65iX/Mtw8Er6t+tNOsLSQc=\r\n=x2N1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"907430527b638cb96704541b347715ec1dcc648b","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.12.1","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-907430527b638cb96704541b347715ec1dcc648b_1670880784763_0.6136846606101476","host":"s3://npm-registry-packages"}},"0.0.0-next-3888dd701d06bedcc2b043270c5dc626b9997eb0":{"name":"mongodb-index-model","version":"0.0.0-next-3888dd701d06bedcc2b043270c5dc626b9997eb0","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-3888dd701d06bedcc2b043270c5dc626b9997eb0","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"832e408a9a39c176993c96d6572943f0037e5651","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-3888dd701d06bedcc2b043270c5dc626b9997eb0.tgz","fileCount":9,"integrity":"sha512-oqxrrG0BtvvbWnsdsqaUaRIoujvJ7ALevNjoC7YmKJUyOtdLty7eiHfqKUqugU9uwptWKLVShApygicvHsDWcQ==","signatures":[{"sig":"MEYCIQDf4tRGLBx6g0uP3v717B9xpDWv0odk8TPOqbUkt/JxHAIhAJHzPVFQXNSuW5o2EAu/4jsVyb5XBZ7aIiYc/M7s7ITf","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47737,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjl58/ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrT+Q//QHjERAoPiawp2611CWCv6ocCzTJ8ibYv2AAhq9eGpMGMJ9Ro\r\n4EWEMngV9YRogEvNSO/oD3Q64UBs3XmcgZIqsgC3J2GQ7y+LtFF36jNljxuW\r\nVmZmfltyH4a0tDwbYXzfHt55AJWh/p8Vs00QCyOR5lou6nf7GcirBjSw/HDQ\r\nOq/AQ43UGy72bDvCE8p7JC44CIwVwQ7ToNqeimkkm0UQ0UF/EJS3Q/tQ+Ifk\r\nPAI3yRjc7dZQ1e6La97KEbOQEWSIxx9UHC6Hug1nkbNG3v9pT998N6r94Tb/\r\natvsT/VRrfgxzTHDY/0ZUKuEkODVMBP7agZQW2rdONSgopwKhbv/RbPI5kg7\r\nuv6yXgx1i9m9RTC/mfOKhsy1gg8P2uR/gAtkMFr8hxUqn5fU4tJpiyUu8K6q\r\nIxipDqDSEyv0EkC859pmVfygyY2bpEd+ZQhEWrOOQIOYyBhXKjSB2aPoXejA\r\nFjCja+8bjHxAsQo5+v00qUOik0up3QDnueB3agUxyxsNm02VyCeRK/jslJaD\r\nQEud3BfChXjNPcyJup4wJmc6Z3e+ly1a+Xnz2Soji9JohFComACSBpKtR8+u\r\n2W+bjPJjuNbIk55Ug92vLgdQgs2VRvkGuFeIcaugjbqQm3i7nQekWKzSZpCD\r\nDUkLz5mkgRGwSNVVbBHlFxzDhy5d/o9n83g=\r\n=GjT6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"3888dd701d06bedcc2b043270c5dc626b9997eb0","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.12.1","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-3888dd701d06bedcc2b043270c5dc626b9997eb0_1670881086991_0.6791226831006669","host":"s3://npm-registry-packages"}},"0.0.0-next-dc4590988660016a4419dbc587f3182af207ed15":{"name":"mongodb-index-model","version":"0.0.0-next-dc4590988660016a4419dbc587f3182af207ed15","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-dc4590988660016a4419dbc587f3182af207ed15","maintainers":[{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"55f97cca60c5bf4c7a08f2cfb0cbb17cb7cb6172","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-dc4590988660016a4419dbc587f3182af207ed15.tgz","fileCount":9,"integrity":"sha512-1b7wK2F+uw96ja/1NQu+x+vVTr9bdEuLlPZJ30JccE0lc/ExNpzPzxmNiNgqt69w7m0YWGZjxNNWXKtNzcpG4A==","signatures":[{"sig":"MEUCIEW5BNJSrKLhhFHJKrbKil5lhTmYJCxIZCMTiDLb2uMKAiEAomq8RpBQMYdeSH/9VAa9zggsn+uxzTsfiSZHORKEvqM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47737,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjmhXEACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqeXA//ev6kXaQEye1Rk8zEIjmMWALFNej0imT9ZRKlW5U9YOz+f3LD\r\ntXE/CyhlWxJ7iAIV37qcU2NS3FdOFl1/J0eIv3A7xVtLEExoEuJFeWGjIiMx\r\npSQf0FJYASr6GQiRCHOAVuZe6kK3No2oIca5JDES58YIExjwpqEzZa/p6v7F\r\nBAJPodE1AKwOZHmidzQiupf1dPaLOFe68qItmdeML4kENZRmg+qGRC7P1ro+\r\n+jkMKLimdxyDJMAiP+OHVODQlY+9TEEB73Bj2F2jgUgO9fvTd6CTkjGhIGoP\r\nhbNttFJ+/b/kFWkXHxZiA5bzL8HbcvyOqQjumZFvmEnUTutVOnc0xbqW5bZv\r\nn7HXCDcFRp7v5ItVEb1d2ApYKydxTEsVRHDIU4TTuR9m2MRs5aplC7aeDWqf\r\nKfVPkG7mOc7W3Z4Xs6M8lY9enxVIiCxERsSjceFldtxKh9BoZqG0cJqdpuZJ\r\nkMsCke23I15qbGpQoLfkkfLoD0xgTvHPcJQ9niEu25Rl7VIfAEV945DcnXE1\r\n+LeWaX8CpqsFo5Llln70gMD2zdFhwtrOGeLbtdFG1M+9NX51t9iECprIoPTf\r\niHReu0X3VSIJFji3OKwNY4+NVdQzWmU/DyloaxdsA/kr0/yRqAHgprIZnVii\r\nv1E8+yUp/SCNbeGUwzwgAIqfe6Vvj9kFPPU=\r\n=dEng\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"dc4590988660016a4419dbc587f3182af207ed15","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.12.1","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-dc4590988660016a4419dbc587f3182af207ed15_1671042500152_0.46215441370417665","host":"s3://npm-registry-packages"}},"0.0.0-next-384d29b0a9580a15a106637331eb1fe9f304acba":{"name":"mongodb-index-model","version":"0.0.0-next-384d29b0a9580a15a106637331eb1fe9f304acba","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-384d29b0a9580a15a106637331eb1fe9f304acba","maintainers":[{"name":"mongo-j","email":"james.wang@mongodb.com"},{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"9f30b154cf437638c2efbe35922b05c7e6f5f6d1","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-384d29b0a9580a15a106637331eb1fe9f304acba.tgz","fileCount":9,"integrity":"sha512-yCyc0V7cyvsajsKCbA6MhCofKBLYMzFUPRn4cvv3EK/Zav7LUk5PTx/oS7VPDzInIhcEPocWhP97PtRwG3Yb5g==","signatures":[{"sig":"MEQCIH+zNMt2mRBjZQqzP9EPWSqwRyglrWduo+my06tLlz95AiBFowTf7Yfe2Kyy8FZUphhv4H2s7Kf5xr3QOlMyDB4a8Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47737,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjvtjRACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqsdA/8CYRv8WH6nMjwTMBVEPQ01GgkLUDH508R4iLAQkwmLtxdc4CA\r\nddId7E3qNkViQbUZ6fs7EcsRleAWPgf+91Ej8x2zPYc37LU7GnrHuI82m7hM\r\nHBPyvNhH6dijV7Yc9S5jwSpceRHYJoPLxHaagfSOI3CnYyY6JQBP5Rym5szj\r\nqkPfR1ttjSG1X2fOVtFTGNZcrZMkRcIEIA1oI4Rvcc1pEUacwS6mWqMQT6KN\r\nqf5XscJr0UXXMm1XWeAu91pn0w6I4nVZM604zPM4mMJemDh2CalKL8a1n2X/\r\npst4DRuWvo+AEYKHduf3zwyJo033qeHYBxCG3S+ESJkASeffuzxtOlrhvcXt\r\nLHuGyDdAfDfKfLowixl6vVBH/BHAMuPGmR32i+Wq2GW6oggYrPAG99djuN0x\r\noNO+NqXT+/28X5BFSFkyrOkHIDLKC2dFFmXhsEIjM0eRAmVE85Hvr+toKhTw\r\nXiUeULum7/owbqLTcuZ5hqY7LhB1pEg9XGJQeD7RbLxRniGKoPBW/ydjq5Ut\r\n5FdO4dxaor2XIP+lRCh2Vbty7P3PhhkzF9bXlpJtAfVoojPC+1Ebtsr66nfJ\r\nT6WA6nsYRJaR4qwCGZ8cBh16cs9YUZsZMS/iuJe3E8TiOm2sLg//E/G0ViSq\r\nHWJit2kL/kbrzu6ksDNnPEHGs34pVnkTPqQ=\r\n=1qxH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"384d29b0a9580a15a106637331eb1fe9f304acba","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.13.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-384d29b0a9580a15a106637331eb1fe9f304acba_1673451729572_0.28901562704720685","host":"s3://npm-registry-packages"}},"0.0.0-next-cbaa086f387b9c9b62aef9381297773a9794a200":{"name":"mongodb-index-model","version":"0.0.0-next-cbaa086f387b9c9b62aef9381297773a9794a200","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-cbaa086f387b9c9b62aef9381297773a9794a200","maintainers":[{"name":"mongo-j","email":"james.wang@mongodb.com"},{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"6d2de0c2a2a343a51b51686eec52c01e04c5d361","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-cbaa086f387b9c9b62aef9381297773a9794a200.tgz","fileCount":9,"integrity":"sha512-sis0LjERPp3hb4W65/QKAWNDMTlL8qvKUq7c/e7L37Ky/OOsV2eCz8mx/lvL+dJ5gul051wpBPHHoXJPVEWR1g==","signatures":[{"sig":"MEQCICI67QdbLjFadnnX6vZaHB729IzuBtnjBLqiaIXZlCbqAiBFqnirHw9jnUNwQf0oWvCUAdRmAB2FZu21UdYm4Qddmw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47737,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjwXR0ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrfAA/+LuA1Ec2DBpmVM/iOrckVqInGZh2922G+6IFwjnzG0/Wcl/Xd\r\n3ABenUB2i125PU4kE0VV0c1kMlrzkOaZg7xg3G6O9VVquSUgFCjz/Q14TewJ\r\na2hZQTJiiTMwIj09vBiSeifehMOMqpdzcm1K/ADTAouiPRNMHLsUqin1mQjl\r\njECREd4Gan8HDuoWztUfWFZh9fniR4oA6L1cTN9xlcVV3zukOChtxuegjCFk\r\n8g5YF72N08UREe3zBISSVwwA0r95g6Qa6AXWQqGQ7IzJnt0ocsTA3i7o7m7f\r\nbtF7zjxt2Z1axucDMx+OYaKi55kIjyPy1lWv9d+oX2gc+GRzjSybNZ30Lep7\r\n/5bLkVYcTMKF+Yzhvf6f5e8sLJe+Uye/XQiOSgZTCkMnP7XeVZOZ3Ez0AXJU\r\nyrrnuknxE0InaSEHWzzFtNbDYW6aib8Sf9rxl9/nx0kQNfiE8kCnaQje5u/k\r\nRg3EqNfFmayIk1u7rFSuKXgUC/3PvV/emujIPL0uwXkr6vjIqLI4MXdd+ooW\r\ngYESXDQvwx3Z8kdvMjPqElrNHeAaiXvAVxJBL2Ut+iiZ54olyvhJKPZaSuzl\r\nIUCMKdH8ItgypJuswWZ5pdLXkHYzhAtFLHTqBQi9EhckQGqUOSYmW9jel8UT\r\nllU5AmAG2PS8VxC4hBdI7uzmJNvC0mOZaDA=\r\n=iGcw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"cbaa086f387b9c9b62aef9381297773a9794a200","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.13.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-cbaa086f387b9c9b62aef9381297773a9794a200_1673622644766_0.13300610319144135","host":"s3://npm-registry-packages"}},"0.0.0-next-cb3371cdb3289f37402f09c6388269e88c943a81":{"name":"mongodb-index-model","version":"0.0.0-next-cb3371cdb3289f37402f09c6388269e88c943a81","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-cb3371cdb3289f37402f09c6388269e88c943a81","maintainers":[{"name":"mongo-j","email":"james.wang@mongodb.com"},{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"5a4c61acf54c72049edceff9f645af8580f86c6a","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-cb3371cdb3289f37402f09c6388269e88c943a81.tgz","fileCount":9,"integrity":"sha512-3pgznMsrVJNk4e8HxkwcoUQqk03i+f5DKg4YG2XSfGCBCiPhUcFoUidLyPplim8ZcZ8cQPjoaNhosrXbNxkzbw==","signatures":[{"sig":"MEUCIQDfTOu+EAuaUUjOWrlok3JH0yHPRo31w0YzCXmlx7EEJAIgLv5H4TXGMs3npTj5pMZ3EAP++VXzgfl9TwlAxbz/NmA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47737,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjwZccACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqMlg//VIjssgjkD+wzidMuWnYSQ0eaOeC1S7ex9QgOKfPCHkk0nS8d\r\nlYOt6VkSccxV909r2dKuyKf4JN/5ssilJqV8wlG09LTcDZ7SR0sRmntl2fDA\r\nhVt/DsowJjzBuzFgKUkAS4Q5qlEgWuJ/7vtbpTbZurBiReizFjZqOZO3j5fV\r\nFt9ZVh124r9GonGMeySvooIUxMJjVp4+9p1dhlVO3wNHDzerGEglo/KgG0/4\r\ntnJxVzbXYgp8iDuHKNhjgBVJaYov+JeEy+2pG32ndqK4PD9B/sc2vgPidYO4\r\nj/A+QtE4XUfmixXkP8jHGrLVCcxCbOGGYu/ua7PRMo3wfyNIjhx8ye01BL4Y\r\niaoxlWvHO1VDz5rzkYQ5Pt8OVhBwdN6Yv2ktfnUkF1Sj/PTlq9JergxnL+ZR\r\nrLv5SIdI4fsObdwjegyQDtD383Yho76LOzgniXrRj4Q11acjcIStA9SKekRr\r\nV+l1tHqeSipdgurxePrtUA3v1PA4yAvOCQxpgM2+B8wv5Cex7FqHZU1LiNQv\r\nJpySX4fp75bpFdADYVuQKmjPJr2jUzHB64BZ8t1VrhK8pBbQkRIs6QCB8A/J\r\n7f6y+XG1e/YaPrIRbGPG7iFhUi187QJi98L/aB1hPVzojCSvmGvZEVzFHaPi\r\nzO0V5tufDfNEibyypT4QGWu+JpU7FtZ+B18=\r\n=2Ah/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"cb3371cdb3289f37402f09c6388269e88c943a81","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.13.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-cb3371cdb3289f37402f09c6388269e88c943a81_1673631516212_0.9609927038879134","host":"s3://npm-registry-packages"}},"0.0.0-next-f6dcd616f47e1d3843402c3e0f47d541edec53f3":{"name":"mongodb-index-model","version":"0.0.0-next-f6dcd616f47e1d3843402c3e0f47d541edec53f3","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-f6dcd616f47e1d3843402c3e0f47d541edec53f3","maintainers":[{"name":"mongo-j","email":"james.wang@mongodb.com"},{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"7359324c19913070f5b8c59f1bbc0bee4f37efa2","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-f6dcd616f47e1d3843402c3e0f47d541edec53f3.tgz","fileCount":9,"integrity":"sha512-5PR9f1X1bFuzC9nBcDJmz4i6ecJnmHv/tLHYw3QQ9Gj6zitUpIJLGSsw4SqVbfkXJh3oXYppYjwhPQ8KcVPETg==","signatures":[{"sig":"MEQCIDwOrAFxqQwC/nM0HNWLzuAmpAeq7ukJXyuxS4ZX+9QVAiByvSPdOYr91ASZgoMKYRZLOrvFf+17UMM0++38FlNicA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47737,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjwwccACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo3Qg/+MzintdwHvbApvAqkQQwuVgw2PvVXi/sMdHEemwDr1vQ/FArq\r\nLxnkiNEqW+Jc9TtKXgG0rEGrzrxfcrX6p2fXHrX2z7/+Y/vDbWDLmDRZntD/\r\nsmaVo8Le9agxI57Za53VmkmEt6ntAulBwNiKAbEKbGNwd681Nswgb5+4Fcow\r\nYIhY5angwaJJbiGfg4cwalYdK5EhExR1UsqDChB9Bu8/veRj9HPHsA0hM9Ox\r\nXvlU+FfTPDJ54/Yffdk9EFrjvIT8NDddgx3FvjrBObABkgo4WbWaIzWh6zmw\r\nRlmRU1sd+B44MI73TN8eaWO8r+0t5uU2JYgpenJoYpPVG2SyFwGuVUhXqS5F\r\ngWnmhHOeXYminnrWxjsetUInFa0tumjBfj3XUUOd05LdYmhARi+IcvH6aUxQ\r\njbxVTao25Om4nnEOyXU5XUX1W/KBmrXBggpKK2Kwy8y+c4OvFBWUYnP6F6dQ\r\nt0t4EdPrd4ct82n8hVTrcsBH2gs5XOMnA9a8eNtYlnb4VtaBP9jlsxZv5h9k\r\n8sg7VMhFQXQMHQk3u4EI++vmROFB8x+EE2RkkwLEcpFRYKAk5fr5dczDXq2I\r\n6o60BmLksLoSyZC7LC0qERmzR2eZGACPJg2touWdG/llfrnBToJy0l2g3+3Z\r\nkUg1am/a0Pg+p7wrWSBU/LYLYYiCYMkDgNg=\r\n=sZT1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"f6dcd616f47e1d3843402c3e0f47d541edec53f3","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.13.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-f6dcd616f47e1d3843402c3e0f47d541edec53f3_1673725724692_0.21768875484652228","host":"s3://npm-registry-packages"}},"0.0.0-next-8ec9e3341a4516d0d09c0d9efbbb836758c48228":{"name":"mongodb-index-model","version":"0.0.0-next-8ec9e3341a4516d0d09c0d9efbbb836758c48228","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-8ec9e3341a4516d0d09c0d9efbbb836758c48228","maintainers":[{"name":"mongo-j","email":"james.wang@mongodb.com"},{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"286903ddc14e43bd799477fb30a4db4d778bab8f","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-8ec9e3341a4516d0d09c0d9efbbb836758c48228.tgz","fileCount":9,"integrity":"sha512-vKgMJFUijacJ7E+Bb8Fz+CJ0vgjhQPi8yKmMal7AN7CeFbQtYRW6dN/rDs0Xn5R7w4JU3n6Hro6vNhzN0sdMaQ==","signatures":[{"sig":"MEUCIQCVuqaPNJpp+N9gAd7E1ylWQhus4BfFlfZPrdxp6uPpzwIgO9hyX1fxMJtRdzwJp/T3qSzRNrigjA5gJSUl6O7kAVw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47737,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjxU8VACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoOvQ/+KPTd+Sv3LKBgs0HeACtKhSkcpqmFVS/neeG+9DhcQL+jn7V7\r\nEPMG1rpwkBTc/+zi+/lWZe8H2maqgs0RNRSDHeO2ZaRQdv/kiKEMIX7cDqcZ\r\nZwLwjc7pcMRJp07Yb5vkzK5C36O61ctozWZ354qO2Eub44UzsqgrSVZvrMzx\r\npTGcirLF4O3UfCOFd2qTg13URaRf+uzMFAMUssf8YNyQg+TAIa52S4z94p/e\r\negyBGQQVxcr0+SGvbgAtv0e8KuK4U4nwFB5EW7FVPM5QMtHlhor7ztl5Iusq\r\nJfyYRIqLE4xNidQjfLOi8ortif3DAaO+i1LaQr72dWZlQwcvO5Ns/Vxlsli/\r\n4WX5J9iNE1JdiJT20+Umblg5DP61HZtVTc4AMZ73WoAa1/9GR9UyaacDuUZh\r\n0YKYvR5aLmbPlS9vZkwk3uUbRu696bHHRKxKvRR3fvAkIATti08xRXxOTJBH\r\nBZImb8urzy2Hdirsj9NmOPKszf/PpknLlxDEGXyFMYdnyyuI+zKYnMyJPIoS\r\nQ45QY1WNW9HM+KYAGScIxE5Kip5Cq4xjMSR2IoKpn5VAkY/i2JbYLNl4kmTU\r\noXS01hmwStJdiFWLXYZftu05KBsYj2cFiAWP6Z7sEAYqoV1Zjk2x9H9EsqdV\r\nI2onYi7vYyBdavsBct+uE7DcwjpD55YrR84=\r\n=at2j\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"8ec9e3341a4516d0d09c0d9efbbb836758c48228","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.13.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-8ec9e3341a4516d0d09c0d9efbbb836758c48228_1673875220906_0.8079672892730501","host":"s3://npm-registry-packages"}},"0.0.0-next-6900ac52ffc5e2e7ef959752bc33235dc12946e4":{"name":"mongodb-index-model","version":"0.0.0-next-6900ac52ffc5e2e7ef959752bc33235dc12946e4","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-6900ac52ffc5e2e7ef959752bc33235dc12946e4","maintainers":[{"name":"mongo-j","email":"james.wang@mongodb.com"},{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"f36d19f20ceac4c071a3037a8eaa710db2465e2b","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-6900ac52ffc5e2e7ef959752bc33235dc12946e4.tgz","fileCount":9,"integrity":"sha512-K0Gwq0RdY5gbOQC6xeUMseubqTKR6vwtZBX0aVjs++B2VTOhUKviz0pK3UovF3ZfFiMEvOXJsElleZR6AfgOLg==","signatures":[{"sig":"MEQCIGgNaWWBuYksLb3U7yS7obFIGd5xmbWVDgKn3jLlrhmiAiBah8nT/sgx5AcWp1EbE0+mwXqZbvT4pCYtjpuVnmgntg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47737,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjxWJrACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqajA//Wq8vEYGnUOWHyo0ScPGMJ7j1/6T+qneJHMxZhC0EkeOJ7zZm\r\npnBcEJtDWjH+nMqNFD3tfWH9v4ovtZ6OKfvjfIzX68l+50yNY/hpqJYsf/OX\r\ngA2vR0dFjieYM4Mfq2BoYn5PRrlGz8g2orAoLt25Dsx7Zd9PVSQ3WkAYLKMx\r\n6CmLolh/WoOJkuFX2oSNk8/1019LZlh0d8ed7vrA3xnEw/AwmTdeBcuIbpZg\r\nePsRL7o2MFgubGfJNRx3E269YM7UpL0RMnQFvxaqpNKDBzU71K6nWeLEJRpN\r\nH2wjAikdqUy6Cm4+3QrWrE/R2ukNAZwUQ+nmStKWWNmYV4mS/sRNYNS7XdHF\r\nJ9ATq8XpIHo3k3Fc1SpqJggr3NupwnyWNp2rWfxZKbb2WJ2UNzK8c4iGdVtJ\r\nex5eMHPRk1xwtSBw2UEPanYP+VIsJVtBiElOK8mVcsYN9PKfG7XFTm3S+fwa\r\n833tFxeHgERh3tbV/aod+9fCUTp6cWINUW40rSwAKz2bDDDke9zZB7xVYsV9\r\nVUMiCplcy1ZerTOZuRm9rtcLuLxWAaJ827cVqXJs9C7AzeYRi/ZvZVAvq2b4\r\nrktBeVjotGKSPI9KIHD/TXVcgJ1rloGJWC6I2U8pod8k6dcEdv5MiJ85ZgHb\r\nrLjyHrd+dM/OVlEMqywhtKsv0SAEpMSbN98=\r\n=Utpd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"6900ac52ffc5e2e7ef959752bc33235dc12946e4","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.13.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-6900ac52ffc5e2e7ef959752bc33235dc12946e4_1673880171375_0.9701849645880369","host":"s3://npm-registry-packages"}},"0.0.0-next-d09be9dbbff785d6692110b819e06b0186bd3ac7":{"name":"mongodb-index-model","version":"0.0.0-next-d09be9dbbff785d6692110b819e06b0186bd3ac7","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-d09be9dbbff785d6692110b819e06b0186bd3ac7","maintainers":[{"name":"mongo-j","email":"james.wang@mongodb.com"},{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"7645b4e9a6fa6498dac90b79a1bafdb941c13fe3","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-d09be9dbbff785d6692110b819e06b0186bd3ac7.tgz","fileCount":9,"integrity":"sha512-cWF32YpsCB9NumnZIgEHWIJSYl6RzEXKZtns4iu3JD/BCY4OWg/xnWgCX9C87VIwm8buLO88b8CFmfpP/1KqTw==","signatures":[{"sig":"MEYCIQCn/CXMuwszItxUJ+816MIxIcKKj86oY5QSwUqr65R+mQIhAMBYyR8rBN0swrPhoh3ju9IbHKJZXSXUzFlZC+zxSN+9","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47737,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjxci+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqvhA//Yk5niRAal3oFPfd1xiISYK6MfoxFDIs68T69IEKzk/JdB8JO\r\nKW6PYYjGKmeEXlU+u2tXoIATkV6zvHkMr3Zw+4nneAi5FfcL/7Z9IO9VWmnC\r\nMXF7nTqJkXnoSIeoLnE64xnkUyLE0boS8mTL0ZG9x8HvcGhljN37rpTvAwCz\r\nvIy+vdEhTSOfwWS8j4kYrQDxjRQSEGP40LZj0l4XMJXhGYWcuxSamwX8UQrV\r\nw17NbFV6ZF1bPtb+6/+5fAmbXGRat3h6V05zgxsFThedZCdkcUI/Zt+EVIyn\r\nbwCUtcTeeljQjBt1KTQpC5bieHtmW0gAZ7w+0TXkVdxoX+fDbdMWChC1LBL7\r\n0RDjxE1Ie65QIjlgi5Vf/DVxkNRUjapkN9UFSjXRIHOX3bpYR2u+A6+cGgny\r\nWF4VQ0gU1/yyuKjRv1DjESNuomusvLkY20+Zo5jxIoDr1Wh7XIfzucA+XUQM\r\nAzwZYAD5Z5E9HdTyEYjEowqN6C7Bcg+TAIsN+0wquDfyTHUKtUZxNQC04Ad5\r\nLDdHcrvcR9Xupxl1TP6m/JyhoE9SGheJ789fW0QeGFC1rvcY6BilI5v64XYn\r\nnHfXjUnqasAL4tYu83cnUTX64toN1RjnxT32nrmR1C4+qgblIT5cXdDEUSZJ\r\nCHSW8Tw5dm2sSAHVBIxlzUNLaEL6+cGY8G4=\r\n=+rln\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"d09be9dbbff785d6692110b819e06b0186bd3ac7","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.13.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-d09be9dbbff785d6692110b819e06b0186bd3ac7_1673906365953_0.44608186279026407","host":"s3://npm-registry-packages"}},"0.0.0-next-4222a9637dad37c08ecb1baac59d26c8a4ecd88f":{"name":"mongodb-index-model","version":"0.0.0-next-4222a9637dad37c08ecb1baac59d26c8a4ecd88f","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-4222a9637dad37c08ecb1baac59d26c8a4ecd88f","maintainers":[{"name":"mongo-j","email":"james.wang@mongodb.com"},{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"56bd4e15a03b06d5fd9be734280c4938c65be628","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-4222a9637dad37c08ecb1baac59d26c8a4ecd88f.tgz","fileCount":9,"integrity":"sha512-gkIt7cvlaphxmffhJlONTDb1X6nv8av5IEhbI2kUdPguZjg6zjKR+kU1XOH2w+hea9EilJ42sgIn868RkHl8Mg==","signatures":[{"sig":"MEUCIQC0HoAPMlm8LNsy5yW3R5dMtNaFT3BT2uWGf1atym4RWQIgETdTgVgGju64kDkFXgrg1BXCzYEUZO/GFHgFdUexesc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47737,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjxtAgACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpVVw//QdVB7P3fpHj0ttczNE4H8OjPbm+yqDhdzRb7QK5UZfhHtq44\r\npu/WGNCeIsdvxKaC70XbcCAuKHX3xHG18Y4B27lPvVqZlfafrZ5be4Qbw9VY\r\nYVfqS473bUgcNsgDA9iqTyzNVbu/hgBWKu3zr8mnplQeJQZVxal+IXV28OBT\r\np226gabAJeJ9J8EbouXqnJUnA5sl7BSkaTJgk/7F3mymwH7pxeb0WbYqLQqC\r\nedrPWT44O5S0MOA9LCQ0G+g11RuTlrlg9KKSAGcgFZWxbZpjlgO3cwohq5/b\r\nDi5gYdO01pQpu7IU2uAzcgJAzTvWPzekqVMJKgdINA/n4OAipXYeH2a1NXms\r\nP9zrUPnmjoH1IyGIpYU2YiU8D9MwzxY5jUhOB+SlhgM9HVt6TPpbv4pOWBxE\r\nf25Wplc44yNOB/BHcLHIClGRHc4JTfyo7CmkKSx4ssj4hsY40JXtIX+GXb0E\r\nj0jVv/rO89A8YW9RYxLgRocQTWOMzkuoTb2TZ0BCC39rKCq39xcX+KSwRmGC\r\nrALYjTikp6Uo/mytyHD6/sJODIT6A/i/ZSpwmUKXEvs9vF1iwvXP39xbDXBu\r\nvor5qVgj8bBPGBW74OiVsZgkF21BIEavj83HnbEa0WWbbTpB9IHYD9KWPS0b\r\nHrCw7XvX3pCKcEa0F1vFJqMM26F4xYepD+c=\r\n=zCLR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"4222a9637dad37c08ecb1baac59d26c8a4ecd88f","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.13.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-4222a9637dad37c08ecb1baac59d26c8a4ecd88f_1673973792394_0.5024123789235055","host":"s3://npm-registry-packages"}},"0.0.0-next-b72d7d0f94c6cd6b83966a08494549408ed56560":{"name":"mongodb-index-model","version":"0.0.0-next-b72d7d0f94c6cd6b83966a08494549408ed56560","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-b72d7d0f94c6cd6b83966a08494549408ed56560","maintainers":[{"name":"mongo-j","email":"james.wang@mongodb.com"},{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"7a182abf754883286ecceccfdc172c820478a9e7","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-b72d7d0f94c6cd6b83966a08494549408ed56560.tgz","fileCount":9,"integrity":"sha512-lfmNcLV3mmjK5cqqRX8YWM1fsUy+T0tqpZxiSyRRPU8j3HtIiNd69lUtk5v0GMgerPXA5c4G1weZMjwyEgzxyw==","signatures":[{"sig":"MEQCIBYTxbef1ukMzKaOlUqZ3PB3qoJdwy+yJh84k8FnOTz8AiBPlUNobjiGdQ4M20fs9ZDuCWBUW4BXPcdjq8hKR1pzBw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47737,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjyq/2ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrVhhAAiPQHEvaB+sFoVfw0+GOhkOpI06PvFAtTf6/fMyi6wSvX+a3F\r\nq7wChcqg6nl/dTqFdubmoZmVgYkNcPpqe5F1qXy7JoD/MIgbCTbFmxE/7cow\r\npqChnCAZzVU6slUrXFKnrCB4G/TJEWFNEqpc24zL7L894cE2qRLRPbhyZeV2\r\nXchk9isExsZN4VwyNpBiQiljjJuRfBMSieFFcI69nykZOOsbYtKdwnu8TgdI\r\nrxNnLY2oBqTewg/j/EfMub7WQpjMatYArXMQla4Yc1RUDUAqZR+93yYmipGG\r\nNcet3mvDWo0GocBQ/C1wPue0IN79A4YQKemkN50wOyKqdpZ0ZQ0cvGg1D9Ly\r\n0i0Od7pFkYa0aR93R3rnHUBMgsbNxWcYTc1eGH+lp5MkSX/LU0Ix58zUnM9r\r\nTvHZXLeHZFUyTxEuTWxtPwuMyqOXU+ot9rpwnLDAfi60WRNmwvuUIRXjDp/r\r\nQDVWUdgrR/9KkFb6LQNu7aaNtdUSdv92Db2HGKPKlvdQUHJYtGRc+ks5IWa/\r\n1Z2hhtDv9fiZiDVsjZ+issCAUqcHBIjWNEtDXQI6QGVrIpE3i7q6e2TdPmCz\r\nQ/lo8/NAq1r7l0hmopEPFzbBUDfugSMwB/iBVS2GYo6YhKtcNbhQ9jSry86p\r\nt3lbRgjeqLeJUcGaxoMvxvFV3EyTEa9zF4g=\r\n=rHLZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"b72d7d0f94c6cd6b83966a08494549408ed56560","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.13.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-b72d7d0f94c6cd6b83966a08494549408ed56560_1674227702350_0.40689635885068776","host":"s3://npm-registry-packages"}},"0.0.0-next-288585a9b69e86c5bb1bfcf4b6df1f5db45ad7bf":{"name":"mongodb-index-model","version":"0.0.0-next-288585a9b69e86c5bb1bfcf4b6df1f5db45ad7bf","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-288585a9b69e86c5bb1bfcf4b6df1f5db45ad7bf","maintainers":[{"name":"mongo-j","email":"james.wang@mongodb.com"},{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"5de37d597a0a74dff7cf8d60d9447856d3e4f56a","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-288585a9b69e86c5bb1bfcf4b6df1f5db45ad7bf.tgz","fileCount":9,"integrity":"sha512-/H8uMcDvR+jOK/jF3rKi/Arn3P7wMZ3s4fJzbBisJpFp3mZ94LIX5pw7qrkVOVDET33E+2Hnm+L7KlKPwKU/0w==","signatures":[{"sig":"MEYCIQDWdaLpox2Q68k+uRVkDfXzX1mTx5+dcEwMGxD5L2CeqwIhAME90i3kHyQBrxOVEvSGMLUc2aK165SWEIOss5hmEOXN","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47737,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj0eRaACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrNIQ//SLuLfX8G4jV35i4GP0ngtsHrhb4klu8vH9W5T++Y86/wxXMy\r\njnsiGSB1zoZtEd2QsG8zDrnjOry3UHFVEHyymWwqLV2c+cNIjQIPtUHMkSg+\r\nfTMVKldKBT2fuWc7gxFw0jEPsY++Hvr4IRY2mZ5W3+VW8w4S9iV5Krwc064z\r\nQxgxgzCL9ytJwV18bcH4jQvNuHtFTyhX5VfaMt39lYZtAUTKsxFJwBs7+/b8\r\nG+C7y5SsgGonmViRSBIWEO3a7kGnbc8Ez3hrYU2PBrP6jZtrJU1tlj8yBXIr\r\nsrEdx+IK2OKwv5hy+lNGrt2hdiriCNUxBjyGznXbSZyMrHRDiF8evjD4f46G\r\n8MeiEQzrbjDUyS/TytKppcYbfh3f+hqMYd2Xvw4IY0mrCG46BDBruKhcmyI6\r\nlwnvm66GIWwBA8HlVaaDnPPL528KqUHR+RMCB65zJYL19sAubeIZPGlihYt9\r\n45oQdKPNyubXT/ozYm2NoXS9qgDyTlye2dlQgtNmBbQY6D4gdQ5P01J4jp23\r\nidePbNpYCwY0ivimZ2kUUEDPdMBwf6xPBAGi+E0pV62SKhep83/8dyHs822G\r\nBfHUNYU61Eg+Oz6PAcNLKP5hN/KVwza0Eh5Oi2HuNqso5/jD/CcbSfpVWpaF\r\ngXfJKITqgkIMNykGrjEHUafNwtNOpW+qSi8=\r\n=p1Ya\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"288585a9b69e86c5bb1bfcf4b6df1f5db45ad7bf","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.13.0","depcheck":"^1.4.1","mongodb-runner":"^4.9.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-288585a9b69e86c5bb1bfcf4b6df1f5db45ad7bf_1674699866769_0.7531356416677544","host":"s3://npm-registry-packages"}},"0.0.0-next-9c2b4b0b01c61fc3051beeb16fa883130e745d9b":{"name":"mongodb-index-model","version":"0.0.0-next-9c2b4b0b01c61fc3051beeb16fa883130e745d9b","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-9c2b4b0b01c61fc3051beeb16fa883130e745d9b","maintainers":[{"name":"mongo-j","email":"james.wang@mongodb.com"},{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"00139a755cb2e54a7a4509d7bd00a0c68e6e3d68","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-9c2b4b0b01c61fc3051beeb16fa883130e745d9b.tgz","fileCount":9,"integrity":"sha512-Rcz4DErdIpvKva5DbWioXz3/vsgA2R+eoxifywRNBomPzlak4WRyHeVyBQBKpBayKGOY5vgCSIhzmVgx/tr8gw==","signatures":[{"sig":"MEYCIQC6hzDnzt0tXCw8VB4MkvvXe1mqSPI6uB4qT+FCfneb4gIhAPy4HZVNeTJxMfo7pb0JRpyZHST9xAoE+XbQETlyu3Fm","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj2zfdACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpiHhAAm/+jSqvKk1mOgaeN5yw/LWOmcN8J/788Wf9GgOPpQ0VN6oa/\r\nfOrDMRDOHJBGkdorQu5b4y2AzdfqKMjp/ew6JmWWZKZthhbFKGRfYj+b3LCd\r\n6Nxz2xLMBm1Eb+DrbK6AV1qG9rb7aAUV9t6i97l3aThKQZiVvEStwkx1M1F4\r\nHHSszNHKApkgjHUCv1Zfz3q2ANr5bCcxssFMspPEbKfdMGEC1lpj/MyzVj6K\r\nNCnqzrtKXoP2YAhMGlm20+0DsGvUsLM9r9Qoy9DTHC6bIfXW9wMUAwqvhdJj\r\nbvKwEmK+1N8Q3YkrNH2Q4QJ/hOSg/N3Q8ncUd/GaI7x+tJqOFsuihMSW/de9\r\nEX5Fuyk2I2x21bgVOjtEm3OGdOCW0/2/3o1uoqpGappmRL4g7/r2t+IbFEL7\r\nAjoAgUet+lAfa9MqoTlnNESBXM/TMIo0ZupW8bmgpHfyoateHMjPR96QQpCi\r\n0VpH1fbBGGj5Mb6RHJflY2X+5L91lMOaa9h+SGiBBSLxqein+R3cyW66wLA8\r\nM+xkhwS4SPri7blJ1o8RvXml+XYtY+NOFYBmw5ocUTGDbhe8xUH37aKUhac4\r\nl06QT9rwMJe4oqNeGsVmHPjtG51v/63ykyml+SbV1xq/961m4F8EBG5SXq+p\r\nMCJFkUMr1+hEsChUValcYQX0j9IuQf2tfM4=\r\n=3R3u\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"9c2b4b0b01c61fc3051beeb16fa883130e745d9b","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.13.0","depcheck":"^1.4.1","mongodb-runner":"^4.10.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-9c2b4b0b01c61fc3051beeb16fa883130e745d9b_1675311069267_0.12128934441943429","host":"s3://npm-registry-packages"}},"4.1.1":{"name":"mongodb-index-model","version":"4.1.1","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@4.1.1","maintainers":[{"name":"mongo-j","email":"james.wang@mongodb.com"},{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"05c14a9f8482d55ae19c28dfb0fc351147aa63cb","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-4.1.1.tgz","fileCount":9,"integrity":"sha512-ALVHvkcE/XVnH6KfmOi1iqiOTdHc1HOugbrN+EmJn1tRl5v7qreEv9VrWPUHN8O52na2y5cbpNGhShqUdS0s1g==","signatures":[{"sig":"MEYCIQD/KgbwprN1QlayAdIxe1vwFQFZ6OrgD164oWoF0L1pDwIhAMBefwC+r3/vJMoFbW+SREemv7TMbhMbS/YAXb9pumZv","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47692,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj24QoACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpp+A//Tt1h1j1AweXwHzQULUUgHlTZ8EcM54hnyymZehlnjnTwranO\r\nR8WM50VmTuCOMGGk5A2P1s1nWieoqIUzrKS+Uixjdl8V4eVBaM0W2DvM5wSp\r\nJuwhTwimtqZZUsP42sePYPlR5XT3fdvVrRqtsgT2uhxUow5yl1eyLnl/v79I\r\nnkkn/mbRw8QoSS1z64eRkBgK7fatkEhdrUogoQVawooUHvyD9mcF9226xBA5\r\nLGL0b11NV9gPPKD7BtAZmAI2+Dx9x4aGX5Lb8Z4dIY+GjC03kL0Xip2x386M\r\nvAwgfyY3AnNQ6JaO94jcszR6AlDqmWwWkcEMtSfHEJ62oC7q1U8xnXp6mBpr\r\neebMNky6gdC5vl6li8kYb0IY9tJRwk3KBtzQT5ByAyeTEKIjaZ1BB9r0lhn2\r\nAg02E1blvSo7egykOgCHXrbFcqJJNLW1MISAG92DmpbSoVgJPmPnC/wbuNXY\r\n1VpfxOmD0pwNNRga8ICrGy4oLH2n9nKtmSnrEdOdWdqnonUZn6hAjhZQnG+Q\r\nJ0qXEtKxumdQrtB0fpGnYVgH7HWGCGe2x1LEmwZo3/tRjE4tyJau62y9HYjO\r\n+7Iu6LSn0DUZivTg8yUlMAy5pl9xJQl7TaWwDJdDBHJoreqgIKSdeizbWN3o\r\nJTWH2eLyRjtMATIVY4SArCeJ41cwziJk9VM=\r\n=lNfC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"cfe9a829fd77fc84e090f2c7b38663167071ebc5","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.19.0+x64 (linux)","description":"MongoDB index model","directories":{},"_nodeVersion":"16.19.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.13.0","depcheck":"^1.4.1","mongodb-runner":"^4.10.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_4.1.1_1675330600460_0.26457967434525265","host":"s3://npm-registry-packages"}},"0.0.0-next-cfe9a829fd77fc84e090f2c7b38663167071ebc5":{"name":"mongodb-index-model","version":"0.0.0-next-cfe9a829fd77fc84e090f2c7b38663167071ebc5","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-cfe9a829fd77fc84e090f2c7b38663167071ebc5","maintainers":[{"name":"mongo-j","email":"james.wang@mongodb.com"},{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"7448d4733036e94a9a9d5858e07978072fdbb911","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-cfe9a829fd77fc84e090f2c7b38663167071ebc5.tgz","fileCount":9,"integrity":"sha512-a6ZChWz6qJP0j94D+AuTwULBk73z851yo9awm4LJNPv3NC2n2vHPW8qOZ38IJFm+UZo+NCepX6IkvUMXSroLtw==","signatures":[{"sig":"MEQCIBYXIL8dUD+7E08USh7i5mHYcWCoUaKhjMg6aOvgUirLAiAPKF0C3/zSZNKDb1GDDvX1H5JupUEhFJ3pWTZrdiHW6A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj3DwgACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrcgg//deFPbWRMJ8vy36kO2dgx5YrOPYc7Hyweb8kxbMB3MobpUTVh\r\nZLmbw3hkgj5EC4pKY5XKqczoN8jqYpFWjDY6MK4v9tYiFXwl/haNwJv6Buaj\r\nFhTQM7q/52T2ciQ+OAGZH/6CV4qVO4iy96bK/fYJ1h6CZ0L0JpQeuI+jpBaJ\r\nia1iV1AbTy2JkRqQ0r0gVt+FOEwCHAxqXXBXhc8LYi02tQ3cIPv2u8yZmVcN\r\n2X92vr8Q3Kej9rjmRl78z239DQrByuoy8auRKNFiAe6slj24GYZcgZVlN4Fh\r\nCVf8weNbge3hAw4b1yLGpGxr5CpzW0qIKz5mYZ7+m/AyS9IJlaeA1WF71Rji\r\nq1EAcmksV9OQImxzpHDFhJhbchGygsvR/e1X1sItzaj8HOZGSwRR2btPCB3y\r\nhKBqD0QL9CBoO1ylT4qh+GOtk6PaI3YlOeaOm6CXhr8He6g8uS03B0hat+yK\r\nIsmVxGfavM9eV5y4BkP2EpVFD1X+F3JlBpS/6LeRSx2WVDyjvRHD1ysOcDux\r\nDT0GEouqWtOAljcyNxAvYoVrGtpmo19Xlg8iznpiyD7rKdjWtOdXgiYGo9Tt\r\nZBwYCEtUxLtCNRtAqX1C59mn+VG9/rsDv81OyVs7TdJUB1UUtUIYA6g07+6T\r\nkZvYlhOw5HzuS53PfDTIvjGbrQFIoPxGro0=\r\n=znGf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"cfe9a829fd77fc84e090f2c7b38663167071ebc5","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.13.0","depcheck":"^1.4.1","mongodb-runner":"^4.10.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-cfe9a829fd77fc84e090f2c7b38663167071ebc5_1675377696316_0.193159483710716","host":"s3://npm-registry-packages"}},"0.0.0-next-6e4c984eb458cbfc675ec138ae979303ef32bcb5":{"name":"mongodb-index-model","version":"0.0.0-next-6e4c984eb458cbfc675ec138ae979303ef32bcb5","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-6e4c984eb458cbfc675ec138ae979303ef32bcb5","maintainers":[{"name":"mongo-j","email":"james.wang@mongodb.com"},{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"2e38aa3e654be260fb13d9ad2f69ebe887c2f7c0","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-6e4c984eb458cbfc675ec138ae979303ef32bcb5.tgz","fileCount":9,"integrity":"sha512-O6KluicGOFIXs/FOIjZ9oUKYydE9as0/SJfOSa6AYAXyBtjfCLFixa5PYNXAlmawoGbAPKRWwae7hkhBHn7zxw==","signatures":[{"sig":"MEUCIQDEUZdtVUnrN9o04NRJ3eZwjP9Rp/hBtklhjk+U9IxP5QIgdop4O4cnlQso3Rt6HC3u/LsBpKg5YBwGtqjJ6tlWTlE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj3EZLACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoeRQ/8D29TnkaQdePn2ro+bEdobsukrwobU1W10IM8hot8XF7oWE7r\r\n4+WCa4WByQDQCAU4v8ZFiwA3glp2d7d2Hp514uKG0CrAowknqOvwwPTzG1jF\r\nwrsEnLYaeCxT+5tEZRAWMcOmTeYikLFJkZEoo1xiE7qQUWV64bYkR4TifEl0\r\nDRQ1Ge+g/9lSaVJuPUecERa2tUld/7DLiiaoZZEu2xQvrkGXIPeJF1C5gJxg\r\nTCZAAoDlbGN+FCdeqsEkPT6QbGhldWHGCRo0vgeXfaPEwghJ6GMENbbCpomy\r\njK/qHsPL9EwN8OZmgqiJeRGwE9cswlIV9vWhflks0px5hBxpnOyaG++OOKSt\r\n+INw1VBysqa4CN0XGlJ1xAhLIQ3qMVmZnmQdLgqOpB2hcTAF8FHyY7eB/7p8\r\nTgeG1OP1Ni1f7d787DpNS4nRAqaKfkWBgcaBAcGqkuVrXkAjEjfd8nu33ITY\r\niXOrWTb4Yyx6M8h8W3gYMqNsLjUnnsBQwW6aRliVa7911gyenV0LdMPwetT+\r\nhcNqCNONKVBCt8x/eB5nDUKT93iLq9nyzBGAKWMRAzTvTHLeDhbI58qjbI6e\r\nlxKkO3dUGvkY038iUUjAF8Sn1QDZNFq5jMBRqGUAo7cQAo1AnkK6WwTmX7vs\r\n43+GEhidIjSx8DyDDuZmlVBS/bkxjTKyw3E=\r\n=InnJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"6e4c984eb458cbfc675ec138ae979303ef32bcb5","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.13.0","depcheck":"^1.4.1","mongodb-runner":"^4.10.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-6e4c984eb458cbfc675ec138ae979303ef32bcb5_1675380299310_0.4723781276902048","host":"s3://npm-registry-packages"}},"0.0.0-next-1638fa3a4f457428151ba0ef06b33cfc4a77c896":{"name":"mongodb-index-model","version":"0.0.0-next-1638fa3a4f457428151ba0ef06b33cfc4a77c896","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-1638fa3a4f457428151ba0ef06b33cfc4a77c896","maintainers":[{"name":"mongo-j","email":"james.wang@mongodb.com"},{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"21ae0b55f438ff37c73e8806b8ee64334eef64dd","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-1638fa3a4f457428151ba0ef06b33cfc4a77c896.tgz","fileCount":9,"integrity":"sha512-kRLTTMMQD1FgtEH4+6GSxHlW8Nbdc4GHx/cg3NpZZKCWe5ocbc9v7jHY46e+tOMIZa4b1Dqrpd9gqteDQj+VKg==","signatures":[{"sig":"MEQCIFwkiyGNEPueV+HwVFvXgG/bjZgH5DMH4q+uReBNRqG2AiAYloaJ/EDPgEwV7A3Ys0AKlVg1eaNKVkYozKonyYjCDQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj3obPACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmonBA//ecRJghKnKG0pPqbhuPKKF19hqujB/HXbzaV+ZSmH9j5LskJL\r\nbHzTlgU25xMqAMwVdtlpQzHpHtwKQejsKZdylL9gH0kRyY7mrteAx9oOIW8J\r\nA844DsM4cML75TpComXF5eW9UCx2wOwEHBfLoIfB6YfDKNOhbrBwSHA5LmyE\r\nfwp47MDMoXSH1egqNfVBdVOj2LaPW0l/WkyBYzAqJs2s8ITpfE1ySqeo3Nog\r\nbOSShAXmaQcvqBRy7V32Urg8qFhjcRAxabz6plvnZlnG/W72fccBMkcmXKGK\r\nqJgNbLPsBYZ6L7CYnte8O0+JsYGuVAZRAPuaXzXZNxRfSPnzaV2xwe93HMhb\r\nke6jZz2EyFdaq8HwiBUnvZ9xsPPs1EioVm/HbgVLlRB8nH6qUjSDJGHqK+RE\r\nNZ+yRbhu8ZTFALhb8CTBI92QBNuvPnouTvTUZIWzX07hk2c3o88FK8QRLvfR\r\nfm/Hy1TU9TKKaDN2udWf3+QFOc2remxKxQ8Qnz/1B0RbevsxCAGYvS2MYz2H\r\n4LeGNBZaqfE6MCmZiYGNnb4t+QSIeEpCXa5Oa6qKN4rKZWEpgRrBQ3ZF936Q\r\nJ7MMzk64m/qgujaK0zW0SrTiV6hlHRRMWj44xJdAfaGDL0ye4ggVB0bR7Kx5\r\nV7lM+mM8bD9l/oGUaWXfaO+SjKFfv5CVdAw=\r\n=tcXA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"1638fa3a4f457428151ba0ef06b33cfc4a77c896","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.13.0","depcheck":"^1.4.1","mongodb-runner":"^4.10.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-1638fa3a4f457428151ba0ef06b33cfc4a77c896_1675527887555_0.8503893790366692","host":"s3://npm-registry-packages"}},"0.0.0-next-3e67b8063fbcd84b0bfd6451e2568968fbdba25a":{"name":"mongodb-index-model","version":"0.0.0-next-3e67b8063fbcd84b0bfd6451e2568968fbdba25a","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-3e67b8063fbcd84b0bfd6451e2568968fbdba25a","maintainers":[{"name":"mongo-j","email":"james.wang@mongodb.com"},{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"4d978ba8d9cc98fc5b6e3bd391ecc099007f2407","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-3e67b8063fbcd84b0bfd6451e2568968fbdba25a.tgz","fileCount":9,"integrity":"sha512-HVs90HAVWSJSVZ3K4m8DCyRkHrdNUIkGXhvKZ0vXJr0NR9Uha7dk4xAZLnvpOfcYw/3BFfaoYf8hBn5lwI/+sg==","signatures":[{"sig":"MEYCIQDuf9sVD420xD0ZByjkws6yEZ3rC1RTVRTxVQbYRjJAHgIhAK3lUNMR0X4AUIrXUi+cXKi4116PHhU0L08FwDpP7VzJ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj4WRbACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoPNA//bDZCRSPAWKYisEVSWUzwR5AI2LOJe4fb8X0GzV2KOocFgCQF\r\nrJhf82MrsE7W3+aXSfkXgq31J2Ywuv49EavrT2TwpSoq3YaELFJT4bLfhgqo\r\nJ0+byVWgF3n13EwbgpTDZYNnkXhs2vSlA1AN7DtOMwckaPXUyF43bduRaa2O\r\ntt0Ll2xf89RY/lNoxhyh2Jqu+HqM74xSEcDmdEM0M/fiVolFuW5W2+gJFAhk\r\n1wms0UCdUtKWWWAbSANdcygymuhFhE8Ul4IJFQuzpkHk+6meuaXSN5sOa/CC\r\nmnGMxl0vNKvMEuRhpmP2iH8NpdCH96D8JMtmfDa/jSADbiJB3RQ46Wh39TBw\r\nj4cWMjjQfua4Kp/llJNf6DpgnhtEVcOnXsODmNzIaMxMqiuz7B5dg2C5RBfP\r\net+BVMWiegOBMOVSKuvQNKezVJ2WGz6zi2183PMO37kTKPYC2ANLvQhPCwWJ\r\nrg1mv+ab//oKZln6yVDp0Jvmnw1InoXR/3hOmN1Z4B4lkqtI3War9gE/1Cuk\r\nnAgKPsB5yRM77KLB7i+XRmMzmFi3IF04O9r4nPrIgX1j1XuE4jzuvZQTy2QV\r\nBdoB6VqbMKzRLk0GLxHjOQExWqpJdg33zlUqDCAQlvj952X11rz8sQcui15V\r\nCQhwgX/8Qr4LkSX58lPbiiRJqk7fLk92ddg=\r\n=f/DO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"3e67b8063fbcd84b0bfd6451e2568968fbdba25a","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.13.0","depcheck":"^1.4.1","mongodb-runner":"^4.10.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-3e67b8063fbcd84b0bfd6451e2568968fbdba25a_1675715675203_0.3119557850755821","host":"s3://npm-registry-packages"}},"0.0.0-next-920407d9fa8e9bc60bfc2577492e5be59254432e":{"name":"mongodb-index-model","version":"0.0.0-next-920407d9fa8e9bc60bfc2577492e5be59254432e","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-920407d9fa8e9bc60bfc2577492e5be59254432e","maintainers":[{"name":"mongo-j","email":"james.wang@mongodb.com"},{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"33ff29de455ed8ac6130bc0f0b275afe0ba93bd2","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-920407d9fa8e9bc60bfc2577492e5be59254432e.tgz","fileCount":9,"integrity":"sha512-c6x/ebHW+qx90f7lfdyLdcClrAS2TOY9AK1zQ1H6RDJUySKV/HNMPYJehuhZfRHqCph7JMQulLws60QCYbxrtw==","signatures":[{"sig":"MEUCIE1SYwLP1egDcWMn7Ito6oQg7nsadhJVvm163UI6qleXAiEAp2tdiDItZA133bcE4REkVosXfjwPYUeXPVShgNft4eY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj4WSCACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpzXw/8CvY8E0Ia2iEEgVDg9/xgD1dhQNP4aYcJ5uzfQmeoS5NAxaB1\r\nQczzAmK6arnchAaa2JiQAgMlh/HWWjpCjpFGNAjFvygFlUGkxsFQzKA/eF/D\r\n3ejweJ6/457ZInDCitLJDhgFrtujatGDGA84L0SbeT4H39vB8i+G3z+VSb1c\r\n25eN0KagRdOIXe38T/apuwPjjszOK/7SIQfNehP1+xcJiESFvB6smWUJp12T\r\nvsn604EYEcUkDGn1NAnVu9tb1YcCXpzmg7jmqR2o/5Ce+SfWjhpa4Jei4Xfw\r\n36zwGwXGYt1VBsdf6lqhExL0t0NEmOioQ3NkJ0pi54c/k1ccB/lRWprDV1/8\r\noS3+4rUjtYVr+cds5kuqyiAYmzykM3zsuk9bAnhVW7jCOnk9+KlgM5HSGNxZ\r\nQOAmAeWEjFl7JQiefqHuAOBnBf5kI8PHp6mN5bDd4mk5GGoM3/g8jUYy7+M2\r\nV/EYSo8jOZAAEL1OjPlQxhsJJ9cAsEPC1kUzCeflT31F4mUSGmDzm4Cg6C9/\r\nfuUW5E2i3JxsSup14On3KbfDhf6sMtD+MtmqP4MaHaQ53KENFLmPJ5R0+0gM\r\nbUBYokj9er6zvawjQBvjGPMufIifIk0fhjdISDLjhhS2mF4hIxuWtCxHB9pX\r\nAZVjjI/eoyyzcCRflsubZESVA5Ipjxhlv4E=\r\n=5Egm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"920407d9fa8e9bc60bfc2577492e5be59254432e","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.13.0","depcheck":"^1.4.1","mongodb-runner":"^4.10.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-920407d9fa8e9bc60bfc2577492e5be59254432e_1675715714413_0.35383940096875155","host":"s3://npm-registry-packages"}},"0.0.0-next-7bfb57937adf16eda85ca92547ea5711d120b4c1":{"name":"mongodb-index-model","version":"0.0.0-next-7bfb57937adf16eda85ca92547ea5711d120b4c1","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-7bfb57937adf16eda85ca92547ea5711d120b4c1","maintainers":[{"name":"mongo-j","email":"james.wang@mongodb.com"},{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"421af139cd7f2ed761dbb1a202c0991b714fa21e","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-7bfb57937adf16eda85ca92547ea5711d120b4c1.tgz","fileCount":9,"integrity":"sha512-rJofRavRArnPgnXfAj8GbVCT3pivpxH0u7ORfBLCoBWr1frGF0os310PiIhNkOuajP5JslVAgbHiBtsFRd9f1Q==","signatures":[{"sig":"MEQCIHS+o4ivoDan+oElXM6/TRbfhy26mzuFWBKvLKjNgOVLAiAuppYjeWiG/LPnOWb0CoaL4Wq1kwd8bbK4/aNLarAW/A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj4WVPACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpYZQ//WNaonRHo2pZnz6/dgpO9Alk715muSUxb4HWkIEoEXapv0PDt\r\nlBOh8S20mvLrNaq+M3wA+8ovm0qcnWNeRnFV/Ucv6crtH6O1vHyctOzDTWqC\r\n0TQXEn7nDBOrvEIbK9DesTWP0e+bmEUbi8oqIenx18dEP+WQ2zEvnGMqdv3z\r\nwj3qg/EAfvQ0C3pLSRrL5N38DrY6MQCBnGMjLwZXBPoKH3+3+Nydi+fa9cUr\r\n+rQrl+pROPSGc9FTGj+8zjI51sJMLE8gx/4B8X0lgecivK+F/jq+jlUkwvBD\r\n/i1xc1zABlQGTe+o912vGZKHX604Jn8GLctcH59zBD+2MLIPOmzqAmrp8lri\r\nSPoACDW5CAwgyo/nhZBFn35g8LvKRO1iqAJa4vdgmuAQCD0qIzxtukds+wro\r\nwWgwsa7eyTsNjDxM8X7Lc+aC7AIu+WtK08MASGCl4H0pKb6RmLLRIG8LjGJQ\r\nEfcnYseGcqABbS9/mkFDU1F0bSec3IXCYzMNos5rxRBVaTnpeGZS9GXihhTH\r\nTGztAArPHtTWgIS31RdFyLK3nvJHTqR3kTooySVBejKx06Lg+PKknZvxYJqy\r\nQRNeIkeTtTbRJ6Fd9MZ2G+jrWDBZ8gq7CE8i/FkFmfOnMmPFRMXVWQYps9lS\r\n+PehlW2VyC7vqJ/ivwU1Yif9X2R4o19uMsA=\r\n=6ylt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"7bfb57937adf16eda85ca92547ea5711d120b4c1","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.13.0","depcheck":"^1.4.1","mongodb-runner":"^4.10.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-7bfb57937adf16eda85ca92547ea5711d120b4c1_1675715919403_0.7982279052314765","host":"s3://npm-registry-packages"}},"0.0.0-next-3b389244f7eb06219ec1e923cac29b45a6ec3e84":{"name":"mongodb-index-model","version":"0.0.0-next-3b389244f7eb06219ec1e923cac29b45a6ec3e84","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-3b389244f7eb06219ec1e923cac29b45a6ec3e84","maintainers":[{"name":"mongo-j","email":"james.wang@mongodb.com"},{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"36fab83fa11fe8310c87a2e08e8ed9f08c3f486a","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-3b389244f7eb06219ec1e923cac29b45a6ec3e84.tgz","fileCount":9,"integrity":"sha512-d0LjHtTyyd33nRDgFJcph4tnqBF6mESJOkyy5GExkfcXKgxfvB7pKsUi1uSTI5RUOxdc3wpG3+oYDk+0/vLPLA==","signatures":[{"sig":"MEUCIFjOhI8z1aglqyotv6mtCeLlbOKoEXwpafUKHJJxp7LRAiEAyosRak4xzKw+LoGg/eCIHDkd8gp39y7MnHOgiMeKnK4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj4WWfACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrkMxAAisvWLgZi5pLvR5C8J1/YSmFkjf8z/cpMhRH7SVXenbiAiv36\r\n3nRWC6kSc0f4geq1sGu0JDjEwdSH9DsOC93zPTvU2V3MtooFNP0ExjO3wIE7\r\nGDYyKaincFDeP5onaFOx009GowzyWGDaPryzyfYYUW+QH8HU+O0Ri0e01H3T\r\nEhZXMh2SzH41T4Ee6YcJInv2w2+VWrWsGrqnAH934wzPLGXrrL652OBMUh6L\r\nfNhKKmBbXafaKk9TXSLkMHl6M8iNxhh1n/IH7Hx7QrZPu/i7oVswt1DnHrEW\r\n/bZ+UqlIbnf4B7qlTeGwxjWd6Lhxg+1UWLSm/9L+tem1HzZpY3QStmkW1yjk\r\nodoDtYZ2wNxaxsPJqOE6ko1yah9ceVYPCkSOj16LkZRWxdo2FjT6aH2wsDCl\r\nnZCCZtQEscWHUMOlmwQnI41GrCzqFQsHTPjKqF5d6f3djFn8EkOYM2ScEK+9\r\netYk8IOLWi2CGPt2JTntMKDlRJoaMJM4vlv7HNm3PMZLstmMxDMqfqs8B+/V\r\nCXcBjWQT6DRF5TCJDu56AF8BFUjr4kwF3OmkvVrhNfZGWDi8rFhf16ZdE6df\r\n8zF8qBmbY7wUPDYlDFYVH2OHhIcgNA6A/D+s3tvo2QQeBSd6WBiwZ7yE9jfH\r\neozbL+K187ymff+LKtR22M4St7bGt1ES8v8=\r\n=Ah4L\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"3b389244f7eb06219ec1e923cac29b45a6ec3e84","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.13.0","depcheck":"^1.4.1","mongodb-runner":"^4.10.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-3b389244f7eb06219ec1e923cac29b45a6ec3e84_1675715999632_0.3713416426038727","host":"s3://npm-registry-packages"}},"0.0.0-next-014cd3f52319f9c3e62d458f4c10e0af7ae98052":{"name":"mongodb-index-model","version":"0.0.0-next-014cd3f52319f9c3e62d458f4c10e0af7ae98052","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-014cd3f52319f9c3e62d458f4c10e0af7ae98052","maintainers":[{"name":"mongo-j","email":"james.wang@mongodb.com"},{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"7953ffec13981bba87d3efe6ac5a1f9c7ac4aa41","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-014cd3f52319f9c3e62d458f4c10e0af7ae98052.tgz","fileCount":9,"integrity":"sha512-SLphp0S8WYsEMDcGuRZRAOReFfcQq+9TEQFp3lY8cVDWX7jUmgf8cQ4zWR6xMuDHn2sqh+gHfyjFCWee6vnmPg==","signatures":[{"sig":"MEUCIBXHLRaHjnfkvT+o6YPfubo17H8WRWvSbi+HFed032QHAiEA3I69BkOYPvJWwHHnJG6lpA87kkH+kr/LMYdJuysKDjE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj6siUACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqmdA/+P8rcCqTCPwOF/ClYKHwLwikqUQnGXXP0RGSuF90sEYKHIBK8\r\nA9q/kqtuwgcsihtqZ6ytYNp7DT1cmGaM7fgERsskepHGwa8xGycoJAZo4sdO\r\nuCnrwzejz3EAkq4Rnh1jAe0Zol8CC9/RG8aJ2/hdo6i4jdukv1l1Kfjnr57a\r\na5z+wlBd07Y2qnjgFfO7bRlN33W5WqbDszaBAjuh5Aue+/i0oPtAi+0v1v2J\r\npP10rVtgsrIFq7/l6zdExpyxX83y/q50aoVECWwaLgYWOTosjO6CQSIy1AaK\r\nivVGdEyY6AKqfugxkQVY31pJo+rOrN9WMwppJGWlNKvlimqm95XfmU85zq4Z\r\nrMEwMNnkI9OCbC8JqN1uLpYiTe4gtL+3BFf8obC3HTDqopENVRRvPz4MsjoK\r\n66FQ7spXyM7yioIWPKb9mA0or7R7dqkHfSxkmNbCemjsl/i5ajqjoiV1uoEB\r\nB8eKzqrivLFmnRem+cvT/Mpp0RQv1gaAqcmNSxXbFB3YhA1+XTmIAUnAQc9R\r\nSRaZUhTlm/BReApWcGAxnuvX4+96xzIzeztWISgYzaY5wjat30rpjwuA/LWv\r\nd8yxEy3sDZPfWxrPc4xX1bGYdzjVD8DraMK9eF7iNINpMlzbHhrL7FlLhLJ+\r\nih+YIZhOcSGVwAKVoL0kIgdURZlimVGtIS4=\r\n=2orZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"014cd3f52319f9c3e62d458f4c10e0af7ae98052","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^4.13.0","depcheck":"^1.4.1","mongodb-runner":"^4.10.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-014cd3f52319f9c3e62d458f4c10e0af7ae98052_1676331156256_0.005046341853205849","host":"s3://npm-registry-packages"}},"0.0.0-next-887a3dabb2b894331aec6aa894bc425e2dc591b5":{"name":"mongodb-index-model","version":"0.0.0-next-887a3dabb2b894331aec6aa894bc425e2dc591b5","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-887a3dabb2b894331aec6aa894bc425e2dc591b5","maintainers":[{"name":"mongo-j","email":"james.wang@mongodb.com"},{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"67178ed05886141787f8b00955bdd8cbd1c7861a","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-887a3dabb2b894331aec6aa894bc425e2dc591b5.tgz","fileCount":9,"integrity":"sha512-j296N80tUXXda6y/pvx9yurfykZphZCoZ1iiU+qY4IY8jseBd6bwwY211tTN4aphzCcf8Kuxp/5TvCpMUyydOg==","signatures":[{"sig":"MEYCIQDW93KE8qAs5XNW0/Tb0wLTE6y3b1EjOloUE3KZ0FSkagIhANf5zy2yU/w6CwpjVo7uKp8q5mivrx2Y9aI2vva40dU3","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47855,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj7CG1ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpFLQ/8Ckq0ABReSyquAejjUO0oSWaNy6KThvsjql91S3x9FrFRK32d\r\npHHCabLUAucXKdPMXCNAK8my1hZ2kQreJfuapF4YWL5vsFE6oPhE8BuA6/Hn\r\nHrFbPYhXelyNZk6s4nPUAwWQb1hI1jw2IrYleqveGmTDv4utnlCTWZilvgKk\r\nYV75i9fUsy+nQSA/85dVm9nqe1I9rIkPMWQFONV6/e37aPp4KRwwT3qxyo2S\r\nOBGwTQ+gr3RKbR+goDkJU5FETWUn8it9qP1AGhK50fwRS6ogTlgrKlRH76MC\r\nr+PcyqlBiffprHS6ntjb0SkFMTc6beF94OEaFIcVl9D0w1+u+4A7ldK0/fFj\r\nl5SnGEUQRSCCNIbTaSwWAH5VAPtOYsfmZCLdqX92AZjEiJrNHnQ+03IYwYvN\r\nn4MDbioI204eqUG8MGw1ik6nJQUKNgUNT7WP3fzo+qt+jrygSlXinj3J2ecn\r\nNUNQsbK/oPfWmYVtstT1DkKW5AdcOrhPs3dKL2VmQej+8nPthOgxqnW24HJO\r\nv8qschl+cWmbcHtJomuYOx2SkifB4BKZocfrepKLIcJm7A5VECzhki0huJxG\r\nsTfl7br+7vZb97cWc/2+VhQGfVOFUljGgFScePq1I1xHJnOQdVA+Syj8EkMF\r\n6VZsVF9aKnzyjAUnFiG6YInpyQp1qLajyBY=\r\n=YPTy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"887a3dabb2b894331aec6aa894bc425e2dc591b5","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^5.0.0","depcheck":"^1.4.1","mongodb-runner":"^4.10.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-887a3dabb2b894331aec6aa894bc425e2dc591b5_1676419509758_0.27994433396144003","host":"s3://npm-registry-packages"}},"0.0.0-next-c5eba7335c2da0b9754b4e52495c98f48ec15463":{"name":"mongodb-index-model","version":"0.0.0-next-c5eba7335c2da0b9754b4e52495c98f48ec15463","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-c5eba7335c2da0b9754b4e52495c98f48ec15463","maintainers":[{"name":"mongo-j","email":"james.wang@mongodb.com"},{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"75d727d90dc7e7a5619dcf58435157958697891f","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-c5eba7335c2da0b9754b4e52495c98f48ec15463.tgz","fileCount":9,"integrity":"sha512-plE3O0yfhSovABh8kdCYs6V3+GS8/9pPNb+Dh0iWKvP36JdlfDs3X3oyZ8GMB9UoCwbv55XItT540gv+COg45g==","signatures":[{"sig":"MEQCIDuHig6WnMd8yjRe5oz4bHO5aMy6LfuE2M7VdHcV0kEzAiBeCdq0kJYriJPOiPketGvQPCw4mCxOdocqkmqmdXbNbg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47855,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj7LirACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqeug//TgoWrs7HporbUavTXsjL9DIIlFJPJ3u/gx6LjJf80u6G+4JK\r\nLXAk2StOE9483bD4bffcwlM20t1K8xaONno6+feSgK+3NqJUNu/mk+qNF8md\r\nrHu++GGWDVuKMoHf3EtteS1VhcpisQ+Cb3Wu2mci0L77zxYHK/LN9A2cKN2U\r\nY9QVGV9FzFx3wDp6hayUdAl3czUhwDpvRFVPK4MBt2Ylq+jXD/Zqc95rnfjQ\r\nbJxLbn/jEd4gm6AkmBZOIYtoX66o593v0++Trzi/R/mXQHjWTV4t/qLH2daZ\r\nN+c37NeQ/wtex+a3J+Xa9BfdbfhVyeDdXh9Hb4dridx+g2GYTPMwB2Nn41pz\r\nswprl11QHPFdvhC9H9vQsGAU2yNLNMDdJtjJyh6mTi20/53B40WABBaxMcNv\r\nco/1snsbr7f44ofKHUAJzo1gt6G5GbcnfeMR2rg+tccyQa862jZONBsS8EHv\r\ncG8GzOX+XgmDvo+hZxGtuAxhXJPCTbhXHkla2ulCLOq6EHeSBWiIOHdY32XH\r\nPsWXvrAT5ko919fGOofq9iVwnjvPWTIkHZ9tZXzR0ura9mViuh3l0ZmfbMVV\r\n2YCPCqhgG1fCd58MNBkogFyH4WhfMlPLl8Gthp3fWh9wI9uKNEN/nKUBo8Li\r\ntmIudwRDaVemN3mXI94fFXxwz7+N0TTZfFs=\r\n=3de3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"c5eba7335c2da0b9754b4e52495c98f48ec15463","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^5.0.0","depcheck":"^1.4.1","mongodb-runner":"^4.10.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-c5eba7335c2da0b9754b4e52495c98f48ec15463_1676458155609_0.285803938356308","host":"s3://npm-registry-packages"}},"0.0.0-next-9acb1d074fcbf6aa34b275f617178f0f155ff495":{"name":"mongodb-index-model","version":"0.0.0-next-9acb1d074fcbf6aa34b275f617178f0f155ff495","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-9acb1d074fcbf6aa34b275f617178f0f155ff495","maintainers":[{"name":"mongo-j","email":"james.wang@mongodb.com"},{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"e2546f32db0b970e1e6e0d3f563c0ed3f432f2cc","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-9acb1d074fcbf6aa34b275f617178f0f155ff495.tgz","fileCount":9,"integrity":"sha512-RdIAsZp3j5G3I0zm9KUVeXvrIYhPdRVCFAsD3w+AelsdwB+xa74fb3EltYpkBkJCWQEXE1I73pDt6gcRPVYJeA==","signatures":[{"sig":"MEUCIHHN1MW2mZ5yQ7779Nmge8NKh+KGeYQ2A7TcNQDLpnxeAiEAy5b/5lKuV0L/VMS+V4Wjy3BqUUTFVqNTGCr/hShJHaM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47855,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj8+dKACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrimQ/9EhuAUa+y/gLbvUqbZXfB18dV8E773NULGPRLGw5j2kFolS1R\r\nj2kvLqc21HHCRwrvDZFFPwMtRphfjGtKmwVmYc5V4hAL6hccyPIcxNneSHWB\r\npfGlHJ/Gt4OP8RHOQ57GpLVroNT0Hd8e9L/XoS818ur/kCPpx6RuwRficytC\r\nIbdrqzIe71nJ2dCA3gGePMuyznlE3t+Pj2/D+QWyxx2iKuIY49OtpEKtNe04\r\nYmnE4ixPLL0chMTb+IeDGE359XZnwD/dHLyec9vKClyR3vc108PxmJnC6vjR\r\nKPKnTGjuSZ8yeRuP9dXPtlNBJsuU4mWRAnGq7cj1IvDdgJKeN57NfAaAEsGr\r\ntz/wfRpAIFnStCqKeJPQFz9Zfy9q0TYw982FT0fvdNgoAu8//MCZAfwis71N\r\nR+muPthcJUL24nSLYCKJ2s2wPmBbDSjSuZ4CXyJAl9n+nLim7uNP+Azz9Dfm\r\nHEI3KivCTmO13De9uJ2ZODXAR4VU2e74UULUFmuvAeNjI21Iysgr4rqpyeLb\r\n/rAHfL49x1MuTbDjJjIhFyN/qa/fz8JKDS1LqI25Inx0R0oJtVyXXJDDGkYa\r\ns7TpsWIPJ1zLwvzAdj5kwEsTWzFx1ELbrMLpNYqZBAHRLgK1BA9RIK/xjPfF\r\np4P4vNG1Upmi6Yh4beCc4jDE8SiBb8MoHUg=\r\n=IQzy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"9acb1d074fcbf6aa34b275f617178f0f155ff495","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^5.0.0","depcheck":"^1.4.1","mongodb-runner":"^4.10.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-9acb1d074fcbf6aa34b275f617178f0f155ff495_1676928841855_0.34989711120893663","host":"s3://npm-registry-packages"}},"4.1.2":{"name":"mongodb-index-model","version":"4.1.2","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@4.1.2","maintainers":[{"name":"mongo-j","email":"james.wang@mongodb.com"},{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"bb1a196f9284b20f83d9ba63f5275eeea8e24577","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-4.1.2.tgz","fileCount":9,"integrity":"sha512-pJLngvI1wlmVomL85bp0kECBh6p9O/9lc3hEiDVC4JwLlgmEQgi/LAYEly0Jl47lgT2d8dYSeN4jSASeV09Nzg==","signatures":[{"sig":"MEUCIQCBkl3IZ27mN/cZysrwuoBGpR6BPQ00kK1zkU7unKq3AgIgcb24CD8ROmPLGtPZm8SD+sShkJcqdJ5aSJ3FUxBwl3M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47809,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj+SIrACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrVEQ/9HxRrjFvPZPPI/uzlC6K2OgoM/08cRAdBzZGWpF8vkuwpo87x\r\nj1JFT1QgRLEBddvJVm95jPflWT0Mu+06wUVzPvbX8QhjfguYmO3DRklmV+b8\r\nfKn3O1F8ZI42ZsPXX6lr61CYOc6It02PnQOWmekDWV2O+zMRwHPlgcNCqQy2\r\nyUJ/ziVQlC9xkAFmQb8SO6GGz0ClmXRUZp1grrH8oV91OAFAxsIsBo0Pq0/B\r\nxK5OBpneW2sP40prcdP4aDz5uWqJaUA1ViMXeK1v5xFWUC8o/tBP4zTv6/Lc\r\nrCY14UvwscRH95PvQyFk3VdDHey59MwJKuLECpTsiMrHucgF+QOwuxeSNiZK\r\nijNIIr4MA4akgMXPlhF7CvZImsYmI8NJ1ZAjnTMyh33wxWC8Fa69okavJf6e\r\nTitM0Ikgqp6Djm2phfU9HXmLQTJNADFOYScEPthbeHlG+P4M2xEUgcpawoHG\r\nZOcXyzFuPA0DMOhGizs3XfBC+wMlkatoQcsLj//zHoX5yueeP61kzaZNk8BH\r\nl0jFGvUE/60rObAtMUYoBq/TmmrBHDB2yi3/1zj0DZjV5s3bWpN2G8kwJZSf\r\npovmm1JQOaIu4jsik/QsrvDw8E4ogAzvRC1GH4o1OQIpNUeyrGGF1HmhwYIA\r\nRTSdzgddTVnbwaLXNnmLN5EG7a8+fYUmMCU=\r\n=ouRK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"96ec6b32140254def920e2b4a8dba9be56633f75","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.19.1+x64 (linux)","description":"MongoDB index model","directories":{},"_nodeVersion":"16.19.1","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^5.1.0","depcheck":"^1.4.1","mongodb-runner":"^4.10.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_4.1.2_1677271595155_0.1472728676587991","host":"s3://npm-registry-packages"}},"0.0.0-next-7675c98b3881009dcc19690b66a6e63e65e1a13c":{"name":"mongodb-index-model","version":"0.0.0-next-7675c98b3881009dcc19690b66a6e63e65e1a13c","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-7675c98b3881009dcc19690b66a6e63e65e1a13c","maintainers":[{"name":"mongo-j","email":"james.wang@mongodb.com"},{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"cd6785ede8511c998a37637e8043f84eccc7b5f9","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-7675c98b3881009dcc19690b66a6e63e65e1a13c.tgz","fileCount":9,"integrity":"sha512-bS4/k03YiYLqUR6klSdw7tLJxVCJpxfd7zzSOl6FhQzM3p9wGO62kpJiVtPiZx+x6SR+MLPO0ff6xEJ2n24yFg==","signatures":[{"sig":"MEYCIQDjAScmV6IYmrqhtcUghcyLsXZTbhfKgrs8FuFlcjXjowIhAO2v9QqJ30kvyyRfWAW38bPUe9TH620EBFLGFQf4IwDi","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47855,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj+6oPACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpdjQ/+NPo07ibm1NXU36WnjI+tuzpllvhwgwgKEgD/5V93/uwu8Y3A\r\nQvnD42jygxmlTwc3vVsxhCMbqh17TKTILKnlLzaxSIanKNFIXTIn+najWlot\r\ntq9Poar3udZK7cJlbyGk/UvmcuUWIuYOPAgoAh64loDMaPZV9jme8dAWYaa6\r\nTEdH8VIK1MsH3PHkTqqhzhweDFrDz35kGFPei/wHykjRCGrB/P3nZkmBWzQc\r\nNk5I8N4pnceB2n0kP6uK+rN9AZKXBW454MGTF2V7TW0af0HQpPsi8/YX/bU7\r\nP+ajeen2y9Qh8LDNUVFro025C6lokYwImQljU5fncjSzFmMhApTUhBkWrfu0\r\ngiscSt05TZ2dOIKyqEvRpgL3az5aemsZu9W3Hsw8M/UZggplFUJICieiqh4d\r\nmR6Ep8Szi044/yjN0cuoug3WRp1mbBzSJ/TQX5HvRn7/QV0eMxk5mEG8XiCF\r\noC7MhCLu0detwUN16Ka8qa3oqGp7caiN9571y3saCGOo6ZvuuBT90tM1BQJu\r\nVtQzoxlRbil4mdzPheXg952EtiPeW3/Sc7HI+bxcA9QmLCfbnfsEKwxSxfA4\r\n9YBLA5dFilJboacRpw1LtowZ3EKEZP65o9ycnjC+rMIJJabNkqRtVQ3AdHbJ\r\nGowsr/+mAR8GFqrNoakH+O+n/YoBMNxICAs=\r\n=N8Gm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"7675c98b3881009dcc19690b66a6e63e65e1a13c","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^5.1.0","depcheck":"^1.4.1","mongodb-runner":"^4.10.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-7675c98b3881009dcc19690b66a6e63e65e1a13c_1677437454823_0.4400336546396666","host":"s3://npm-registry-packages"}},"0.0.0-next-e5f447d1d4e3c5e91efdf6c7e380240ff610dc24":{"name":"mongodb-index-model","version":"0.0.0-next-e5f447d1d4e3c5e91efdf6c7e380240ff610dc24","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-e5f447d1d4e3c5e91efdf6c7e380240ff610dc24","maintainers":[{"name":"mongo-j","email":"james.wang@mongodb.com"},{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"87b21d2f09a1ddd3d7ab210a682cf8534d0832a9","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-e5f447d1d4e3c5e91efdf6c7e380240ff610dc24.tgz","fileCount":9,"integrity":"sha512-wqGj+rSqnUSfyduu9B+xVT4ITorMf4dZbo5grzxQId+fvJ2QA3FH/DmdUclmdNrlZZG+xlknaW1cWAZhbYq0HA==","signatures":[{"sig":"MEUCICVGqZYP8wFmHm9kKkWC8ZbLKFwk9bfhklaLPvrjXV0IAiEAjF4F7QdJqOz9tqZZJZFAbweujPFakko7PTuwtfvpExs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47855,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkAGCPACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpPGg/+PJrwx2pmB2TEi1KNA7NfhwYDfTYXT4AuZUxu5puOv4P5hDGW\r\n7tx3VkYkKlfEtUT0soh3zsmx6P0uT9O6QA0nMIscECiEWTB1DDbFvuvXv1xV\r\nYVz11EtiOsKx8NXVicTgxaYLe+XbHsvUSrWzaQThKjI5m8BvGGPNZsFCftmj\r\n0mYKns5S1pm2VCCL6VBT5Y2qxh4Cy2NZK6+l24jAyMMNo9MsE5AOf/MKd6Zf\r\nO9FBKKLusGchKcazSc5dJ/2VxUA8itCVmqBJPoD0AE/zjR6gqR1155qejE4+\r\nNkdH60gZMZdo2dBtvsyqm1wt41R7CmspUG/Wstmh5GHR/j9hVvrb8aUW0Xw+\r\nDjESgWpaxs5PraYGD/QzHLJHZ+FRQ5zMbmotxjqoOgzRSKtkPSh6atUsq2Ti\r\nN45CUaYiaN5O1gT8dVuwylFIPMxIB5LEZQ8aoP5LbU0M+c9sosgWWMFTMYnG\r\nyQOo5G2HtQnEXgX1SoH2+pipNa10NRnG8wgTyc0E8X1dMDdB78BODy9SQH96\r\nlx/q+hYhOve9po69f+oIDvPGzfHpnoO4nJfLTLtFxZFWwDSxFZElqJMaSius\r\nX2Mj7KZO4ntXMK3SHHW2sAW/T4ZQVNEyGe3grbbTR8ug85T43P/47YBnGgMj\r\nWVCOVm5WjIVF5sVRrbSpwwlxXW457MHGCDU=\r\n=dr7n\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"e5f447d1d4e3c5e91efdf6c7e380240ff610dc24","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^5.1.0","depcheck":"^1.4.1","mongodb-runner":"^4.10.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-e5f447d1d4e3c5e91efdf6c7e380240ff610dc24_1677746319382_0.09726150341804352","host":"s3://npm-registry-packages"}},"0.0.0-next-e0e7275f55471eecce19ff3b75439fb06dce1fad":{"name":"mongodb-index-model","version":"0.0.0-next-e0e7275f55471eecce19ff3b75439fb06dce1fad","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-e0e7275f55471eecce19ff3b75439fb06dce1fad","maintainers":[{"name":"mongo-j","email":"james.wang@mongodb.com"},{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"86c26edc43a7da3f057ee69f065cf1a8ac30ee69","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-e0e7275f55471eecce19ff3b75439fb06dce1fad.tgz","fileCount":9,"integrity":"sha512-f4FDf5+yBEblIS5o2cscOA/DaJqtr51/i3cV1BN+OIJXaE2fb4OPsv3TDY6lO/RMh+Dlyj8YYORJQwNrxckhDA==","signatures":[{"sig":"MEYCIQCkn69Qz4DdwNY1ZFAXCjGx2TcpYgJsoFHqKXK/bKuRZQIhAMdi4erAvvwk/6iyXf81fzH0S5SE+QsRYedzQwQZGWuB","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47855,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkAegbACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmofqA//aYlB9LEpOJGxCdGShbRBCDoTMNbbfPazbbbpwTzA3CBXNFkx\r\nhmMHvE6lK/Wey41ZlsmwvcSlmn4tQnmzSkxh2VzkZmeep/a6jDVVfaCkhkDB\r\nGe28Ofmk5AxqLiq490lTOoLvLCsFizlJySmHZ4Je47TDF8YR62tQEF7//8IV\r\nZ2VpfGxZkPwBFvdWTjQbrmXbB5pcuP7yagqHOQRpSJpozDSrpG6Pn/Sbe2yg\r\ne+WcEqSjNZfNqHduwxnApbcRmpckNm37w+E94aVtJmx25NoVj2lvC5c0BxCY\r\nEjqQ+95TQZkZ9vWYwboGzEOcQalAFTKzBrqtw38HS8ii+1ouzYb3EJoMvdid\r\ni5kE0qi8ncPcdcYQElkzvjpVKZjW/llNxscxhlactf/Skmg4LXOZAn1aVEuA\r\n+EZWhKWJhygjf0l7JQBhphtTm+LiyrjW0S+sZw6WQcRT+bHvq+GDVWarevrf\r\neUygaofKSw0p42/cS3c+HEMxULgTdKUGcPECJV1mOiCj9Oq5JkfIUNm17SDr\r\n6kFza2d9HnkU4fIrx1VRGq4jxfv5651G0oXHIO3VDppZMWniCDnxqcFVirIE\r\nr3GhmoQlRu5BHTSJOtPdvXSJL2Pw+A2AzHLacxpZidWly2e8UVxxMX3c/YVP\r\nnx24w/WRd7wuEMdel+poDvSMv6RRjoLGXDI=\r\n=zVy1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"e0e7275f55471eecce19ff3b75439fb06dce1fad","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^5.1.0","depcheck":"^1.4.1","mongodb-runner":"^4.10.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-e0e7275f55471eecce19ff3b75439fb06dce1fad_1677846555260_0.2509168362660239","host":"s3://npm-registry-packages"}},"0.0.0-next-a8732fdbdeb3ad56ef759d7970565ccd371888eb":{"name":"mongodb-index-model","version":"0.0.0-next-a8732fdbdeb3ad56ef759d7970565ccd371888eb","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-a8732fdbdeb3ad56ef759d7970565ccd371888eb","maintainers":[{"name":"mongo-j","email":"james.wang@mongodb.com"},{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satyendra.n.sinha@gmail.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"f2f609fed78a7d842c4b47ba456038b594108131","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-a8732fdbdeb3ad56ef759d7970565ccd371888eb.tgz","fileCount":9,"integrity":"sha512-f6Isb67RUDCv6XDYMIWVahawRJf1Nl0pnGs442pC0iJSFYRkzvRg1KcwIwGVUCRXtf2++GTKBF/HFvCY6Wu9xg==","signatures":[{"sig":"MEUCIHv7s7EmkhU0YS3HIdtZxn2hyoJ3AJgV//j00WrSI4hWAiEAsB0Za4zzBWFOqWZibU2QOXn/C5dj1QbarrtImSdQAss=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47855,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkAf9vACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp/Lw/8C29aYILc/H3igmenZBQp65MQNJ4vHP8EviGhpmzFgLBvF5AG\r\nH8cKrZiOPd/HJi67Lc9rY8yp+g2ZnCzbp/SVZARz46o7FTbRnjL1PTTKiFcV\r\nqxag5b2RQHEDPzDhH4n1b5d4whiiaSt3Fj7OSwnJOoICPizLNyF3fSnhzBeQ\r\nMhoI3MDgOaUgrDXIIvpsjP/HKmTjf2FgV5W9g9RbSMku9yO7MjZzH0SBA+Tj\r\nZU60wTrlTZuCr09eG+d78VxIzQl6GVIuAf8yT4Zhg5AzrVpGgjI7IHFCpRgA\r\n+ueQPPBCwc0/cim/Lz4Lzib9qOFRELkFZnwN8oFRDG5sdpMHKhUBGG+hjv9R\r\n0X15aYo2Hp5hz1j7Ct0xVMrGz7QY0UKHTNNFPaaWWguAB1x3nzJvatCRPUSN\r\nQO5d/5gITmbdoiIMksl43rmk6gvP3Ws4rIFhsAsI123jUIPcMk1FCuA4a3We\r\nyvw2J8/TpLTcF8OxDJeX4rJor0SI6yMT2UmK0elOuMcf9dWkcKe78shhfgcm\r\necabNmF6w56S3SDbdgoOZsoAGIXHvglSFttLqai4ucvzb0ANguR6YypwEROY\r\nDnT3mZ2IG2T18hPTBOOwYM33ORdNC6d5NHK34I2Njc1UvcktTy4o8UsIwcJk\r\n24J3J6VSR7kj0+YJEmi3Uat/Nb1lHUhCwvQ=\r\n=lvh5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"a8732fdbdeb3ad56ef759d7970565ccd371888eb","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^7.1.0","eslint":"^7.25.0","mongodb":"^5.1.0","depcheck":"^1.4.1","mongodb-runner":"^4.10.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-a8732fdbdeb3ad56ef759d7970565ccd371888eb_1677852526843_0.41415093750070153","host":"s3://npm-registry-packages"}},"0.0.0-next-04ba59a8ace9d68fd90d540d8a8936985115e22e":{"name":"mongodb-index-model","version":"0.0.0-next-04ba59a8ace9d68fd90d540d8a8936985115e22e","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-04ba59a8ace9d68fd90d540d8a8936985115e22e","maintainers":[{"name":"mongo-j","email":"james.wang@mongodb.com"},{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satya@mongodb.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"d2bab20bb6a583d3d7cb73a0b56e7d9a11dc799c","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-04ba59a8ace9d68fd90d540d8a8936985115e22e.tgz","fileCount":9,"integrity":"sha512-cGHcOGQiUNIPRPvFEXYO7WqtYMWu33xCS3ONsgPFyTDb8J3hIO4MCAqxMoW2tDd8imsvKyNloh9pUgtb+SoXuQ==","signatures":[{"sig":"MEQCIBQoQcE7fExO/lC+1KVbAnHci4OGRB7eNFMKFEVRlbkHAiAUj3dYcEIPNQW+HhiZqeIXfnk4IZsCse1eyq8aKS7p/g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47856,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkFa+eACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmofDxAAmWbE4EvL9iCl93Iv0f+qn6MNDldx9tQllwJD19N+JnfeQE3T\r\n3qQ96iNMcJYlghpG1EGbP0sQg7KlXsibrnE4nk29ITtvC4DqzaA+GgoPuBMO\r\n0kIUw2gt2WP73N+7zMTLlhj4jtik2QKqHGNCa4EhCPd6T4FSzfcZ1jQiXj6J\r\nD2r4Xq+t7QXvSGpHuEEFs5Uw+pd1mO3cQ3P4Ku4nwgUKuAvUsD5r/bFNJ1VY\r\noQ0TMcAUbzEmodrpzOSsYtuW9hPLHtzMNPuiK368zlRSy3efnof4d1lQSePL\r\n/4TFFdfEZAEMzuWHr6LC1ymHctZecy2C6ob3xk2/MsA1dZF925zAgFvUhKIm\r\nmkHe8ozhot+pI69R3Md3gXhdE4dsyNkGXKouGoiSLS70GS8RfGJUsaxoBZzE\r\nNTTFJCljyKwqKtFcgEDd8pgGjlLAVBE2mLQ5qTboFepe3G6fjDQle838puye\r\nP0+dZ4OJ7sy/r6smO+m07ILXr02aQUfzSWNThrwFplOF/JWMwrIXtuKHwVeU\r\n5getg7S2yqP5K7xCSUX1HdP50ItYH6CWGXsTLS5ez3vWjm1/CkSwalk7TmbY\r\njmeO4HB7p/jBX2AGgG8sqo+1r/4rjOqyEGLhs87rFSowTkBFIyMjl8MvPLc8\r\niypLozgynS0HuCXh6E6ikglMUM1pW89KDX0=\r\n=Cbye\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"04ba59a8ace9d68fd90d540d8a8936985115e22e","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^10.2.0","eslint":"^7.25.0","mongodb":"^5.1.0","depcheck":"^1.4.1","mongodb-runner":"^4.10.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-04ba59a8ace9d68fd90d540d8a8936985115e22e_1679142814124_0.7692058421813786","host":"s3://npm-registry-packages"}},"0.0.0-next-ed8f90bd71f084cb541f99b15caf3833ec6a953c":{"name":"mongodb-index-model","version":"0.0.0-next-ed8f90bd71f084cb541f99b15caf3833ec6a953c","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-ed8f90bd71f084cb541f99b15caf3833ec6a953c","maintainers":[{"name":"mongo-j","email":"james.wang@mongodb.com"},{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satya@mongodb.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"cd1ab023f3f17c501ba4b9a40b5d3c36ace140ea","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-ed8f90bd71f084cb541f99b15caf3833ec6a953c.tgz","fileCount":9,"integrity":"sha512-Ualt3ZYiXPBxS/qlMtNnhZBST6eNmYdqfPzuEKmfX4VrUfbYot+aRSMoMwg5Uk1qsUu0tcrIX31YghLp+GdzJQ==","signatures":[{"sig":"MEUCIBm/EfUw51agAoFQ9B8f7jh0Nbk+aiuKzNCE0NifKOPUAiEA/Ae7WU3yzEziog+NUEKKIB1h1uFU1dcMOzbeMHbat6o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47856,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkGMiXACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpPlQ//Tck0fpN2nhp8deqBQb5Ud4e97nEXKEBFcGz/glMidp1kS+7+\r\nvoBs3zx+u1ZfTbVgW4T/OhCliDAc58BdS96yT9olI+NkKf0iWGdp/7CVWEKK\r\nCCd5MizFk1Y8jGUrOaGkrvGKzu8uja9ZkPc8kg69zDr31T272o7aFhwlv4yk\r\nNE6FfHdHaMmUya94r+4Xu5CNocQiqaWuX5aHJ0sUV5zw4O/Py7IqdsWkT2XT\r\nND0k9tJN5Vizi6eoYmI2QRphHzV9lYP5H5eYtcwGzv3eLPZWvCSHF4FR6HI7\r\nFwyOsV+XMIeuvY7bmMtEwrJPNTxKuA5ruf+dY7VX13X9Z9NjyppNe8pMGGZE\r\nULRUUQfdg9rZDkAtj9GmMt4uyWkv04lm+9VB0OFuoP0O/Yl4kNmK3dZzWm4p\r\nuOLjosecQHC4H0rhHyB6CfMYq6BHm1zfdtiPiylNr9WK3vw4DjKcnFuiG0oA\r\nzdewc96mbaAaPqnF6koROKXzlCzOMx4qKvpbuBAIrv/tf7Z/QijV4aeTjQVq\r\n+c2HgWDEXCEhrtb7yuLJmahGw6yR5IX1Hm4/ltqqitn9O/K41zP6uyc9aZhT\r\ngQEOevSSpLLH+DZpxB9bF2YUqHk6M21I/jxW8+PZ5X9UEr72D9p4zH0TRIlU\r\nEGUu0TcA2CVdFI0NlwMgb0Hc4zmRog17Vu8=\r\n=t96n\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"ed8f90bd71f084cb541f99b15caf3833ec6a953c","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^10.2.0","eslint":"^7.25.0","mongodb":"^5.1.0","depcheck":"^1.4.1","mongodb-runner":"^4.10.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-ed8f90bd71f084cb541f99b15caf3833ec6a953c_1679345814979_0.7274180625144919","host":"s3://npm-registry-packages"}},"0.0.0-next-97c3945c3938ec09f9aa141b791f53d15bd47600":{"name":"mongodb-index-model","version":"0.0.0-next-97c3945c3938ec09f9aa141b791f53d15bd47600","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-97c3945c3938ec09f9aa141b791f53d15bd47600","maintainers":[{"name":"mongo-j","email":"james.wang@mongodb.com"},{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satya@mongodb.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"9f5f53c37826afbc6c603f33e6cc34cba2096ac1","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-97c3945c3938ec09f9aa141b791f53d15bd47600.tgz","fileCount":9,"integrity":"sha512-ksaZaI1K+EiMPKwi+4x1VYXMAxm9yAp2V1ihvu2N+5hdC0SWPeO94E4mtkUTYFg6ly+4O8p06EEE1apm/67/sg==","signatures":[{"sig":"MEUCIQDm5o2MKl2eSRsvuEe/rJqjMtsdzxMe8dsgxf3fNXMV8QIgPT7PZENefHXSbeWZc5eno1tLeQYpUAG+Ngt1qMTPPUE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47856,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkGMjDACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrFLg/+LgkjpneJWOq18TFyfwbFF4zDXpLxeG1m3qm9A+VSjChRtDgt\r\n8drM90Ph5CJ0aMCcQkfxqyk9hdFKppBnsM2m7iT4HTIwHyNlbf5ZtnG4Zitl\r\nPgJerXZPnt4/YEAVO3eFKr/aONpjVTVEnsjTHsfeDR7KwbJxHPLAVEnIdrgE\r\nuTU7z1ARrN6HEF8TBJu4tAavNNibxLzqjYWwWMPJijlUtjt3yqITPcPnN+Ba\r\nHA6Cbba/KI1Grcmrh+7RHG6rusHzU2rBA4qeti4zhl4fzgzPplXtv/dKbG+D\r\nL/9xbViS+0UG14DH2WjEQpxJB7k/AQZQ2YV1NY63tnsPh/ZcNe0m9erzC6mD\r\n7HqMezdUm8p6mJqtVB7iSRSEo1CmuiyjB9TPdhpseAFNUFYHdBjw9zrSMbW0\r\ns2XQ5hdg/09m95xUeYVMRQcr7Y3lq3c8dlCwhVlJwRIqJi7iaprxtXo5S6Mf\r\nZOvgS87A8VBgmaJM1TrLhQ2ALGa1QXBRMyrnEsA2XbhKbm58eUTKirZEX2/p\r\naO1f+0BoHIfMp0JsGPko864Cm4hprjtZe9MterUxuZCIYr9DXDJxHKGAzTxv\r\nLZcm+3d1q0pYyKflacPvQU46UkO1mcgWQlYCqmDARbxePMud2KCJMM8pdGhb\r\ns8O6iIIPla9HREZkyf//jF59OSBZ3gA67ek=\r\n=X00V\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"97c3945c3938ec09f9aa141b791f53d15bd47600","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^10.2.0","eslint":"^7.25.0","mongodb":"^5.1.0","depcheck":"^1.4.1","mongodb-runner":"^4.10.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-97c3945c3938ec09f9aa141b791f53d15bd47600_1679345858834_0.33759772428816404","host":"s3://npm-registry-packages"}},"0.0.0-next-d4e65fe0ae295543658a34afcb1bd79b9b5ecd75":{"name":"mongodb-index-model","version":"0.0.0-next-d4e65fe0ae295543658a34afcb1bd79b9b5ecd75","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-d4e65fe0ae295543658a34afcb1bd79b9b5ecd75","maintainers":[{"name":"mongo-j","email":"james.wang@mongodb.com"},{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satya@mongodb.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"fb9b303429c6ac5429038676ea5a0604fa0639c9","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-d4e65fe0ae295543658a34afcb1bd79b9b5ecd75.tgz","fileCount":9,"integrity":"sha512-+COl7DfousDGZlgWsQ83YUAMAro4g1eib9gOopOt3YxUtaaISJAQ56RmKqQXjo0IQ71ej5ZTGA0L244Ocz8zsw==","signatures":[{"sig":"MEQCIBluclm32N/Eim37NQAsYLMDTlf0g/5ZGEPAdm30DJjbAiAH9IQXfADrTNs5l7BS77YSuR5X9sP7SoUXTLf0oWnoiQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47856,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkIwfuACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrApQ/+JKx+ipCdqXJ/otrwUkzv0hpoQx7bBNQ/SDFVWjpx+Zpmv18D\r\nEkjMJ5TQR7WejMFsJtbcC35lsbg6laUClMrx+fWrV7/lG1XCe1UyX+SJuaXX\r\nJSMnczDgcImkhKUjMiRjKOJs4vAU5hvcKNVR7Qv+NHf4bJzhYdTXlBD3mIOM\r\n2EpuodV6STfl5nyNP6i/EsNRPiv5vxh7VfHuP/mwssgHzDCDmyWKMWmJctKU\r\nlfac6wjy7Um5QT42xFoJwDmH0Yv8zK+wQLrRZi2xWRK/x8L2UE28UyUhY3Ad\r\nZxuVVVWzdNJdcEw1adFpHeEYqiA0PWeKvL+MJWb39vMMcwdiFFgg9Vh3nrG/\r\naAPspa7jW0lelFwlJoyXVFb/ie19oyNffj4u/uxUNlokPWhKtlyIeN55Zbq3\r\nlkE+9En95Z7j7ng6ktqoNc0m3URfcpSPYwwrY3yYMc7oHaDuVgHRapx+fsET\r\nJdtWv5V3ogBY5d0Q0z4kVvCYXpTY8U7VDI7yNMwlU79urjwrupSpgHkkhdT3\r\nMwn1GvBDppih9PnJQzE1+283zsZ9sSreJ6/rfNvhP34hPWbxGAVGRuI9KjeS\r\n70BRluWEgo4mNfVXZ239OaRqsRw6RKNnk19RjUS/udliZgD5z3b/U1UcKX4I\r\n8Htr9srSqutodoR2ZZHIzHCryVOfehi9FLo=\r\n=H9Ox\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"d4e65fe0ae295543658a34afcb1bd79b9b5ecd75","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^10.2.0","eslint":"^7.25.0","mongodb":"^5.1.0","depcheck":"^1.4.1","mongodb-runner":"^4.10.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-d4e65fe0ae295543658a34afcb1bd79b9b5ecd75_1680017390514_0.6065625713270839","host":"s3://npm-registry-packages"}},"0.0.0-next-3904cf8445c3449f8f87362208a2b0448f57aded":{"name":"mongodb-index-model","version":"0.0.0-next-3904cf8445c3449f8f87362208a2b0448f57aded","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-3904cf8445c3449f8f87362208a2b0448f57aded","maintainers":[{"name":"mongo-j","email":"james.wang@mongodb.com"},{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satya@mongodb.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"625491deebecdc360a40f29f8e408c30d8077158","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-3904cf8445c3449f8f87362208a2b0448f57aded.tgz","fileCount":9,"integrity":"sha512-D9ZdZFO+5qQ38J+9kislLZ47kYzRZ7ofPDPC9tgT5rUft82NoTSHjS4IYXevhmusSJzIyc+AFrWQ9TxXFa7P0A==","signatures":[{"sig":"MEUCIQCtyR2WqQhCToPaJOhhgmRmdzGTFkf2dLHL7me3itB2nQIgIxtHoXV61qItizB71oh/yJ+PIW1KyxN9X7dIbARfMnY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47856,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkI0GOACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq6wA//SE3IrwL8aqwK66kPM6HzndJBGLYaJes3gED1JLffUOqLxRVv\r\ntFUl0mAqGH4BGPQe8ANHowL2iGbit5YjaEScsEFINpDHYMa+DozrMu/P8n68\r\n3rOySZDNSE3z73tFBOXUlNM9nzw2uZGYBJ4iqK7hLZN1fIPGK6ClTRP1y/aL\r\nvBc1H3xn7Iqadof3dcZ1kyjIaNVcj3iErssPU2iAe7xKAottVPUOZ2ZsJssn\r\nsXtBh/uQygtShEZDFwfLI7NjVteGN7UG2wSnQm6IoW8kCiKQ/+HUn0SFQ5vj\r\nUGZdA34XWnov1ouXHOzMcoA8+lQynCeBO8qMcxnGYcpZPwVh+IX4UhfVfXy2\r\nTZ5SZIxHlQiPIgny/tEGSFN1FWwx4uhoc/A3R/jbNEUDiKgSfV3JnQ6/m0js\r\n0QnZRI+LmGrYWnFEanp/yOLaYpa1Wm0J3o6fpxv7XVsdW2udEiuLxkOxmyCf\r\nQSKeoXHoQyBxqq0rRUiDAEKEtM/lB5/jOTF0S7BR7fk5DCf/qbygC/p4Z+JG\r\nEd0rpPdnQVz7Z6wJBxQpjYAUe7ikfucLV+HGPKi82Jy+NqYNhtvAlc4pPYZj\r\n0g+gFkorJX6xc1N+ozPc+bj8kleTVcbbDOQ1WUOQY22bbJWFI1ILh/0perma\r\npbwXJ+rDrFMYYu2GGwA4s0OXyP+1UXPFx3k=\r\n=nKtS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"3904cf8445c3449f8f87362208a2b0448f57aded","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^10.2.0","eslint":"^7.25.0","mongodb":"^5.1.0","depcheck":"^1.4.1","mongodb-runner":"^4.10.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-3904cf8445c3449f8f87362208a2b0448f57aded_1680032141893_0.08770870763192495","host":"s3://npm-registry-packages"}},"0.0.0-next-a863ce6adfb98ced08f9644a294f5b63b110c7d8":{"name":"mongodb-index-model","version":"0.0.0-next-a863ce6adfb98ced08f9644a294f5b63b110c7d8","keywords":["mongodb-js"],"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","_id":"mongodb-index-model@0.0.0-next-a863ce6adfb98ced08f9644a294f5b63b110c7d8","maintainers":[{"name":"mongo-j","email":"james.wang@mongodb.com"},{"name":"mabaasit","email":"baasit121@yahoo.com"},{"name":"alexander_schroll","email":"alexander.schroll+npm@mongodb.com"},{"name":"chuck.kalmanek","email":"chuck.kalmanek@10gen.com"},{"name":"mongodb-js-user","email":"dana.groff+mongodb-js@mongodb.com"},{"name":"rueckstiess","email":"thomas@rueckstiess.net"},{"name":"durran","email":"durran@gmail.com"},{"name":"lerouxb","email":"lerouxb@gmail.com"},{"name":"fredtruman","email":"fred.truman@mongodb.com"},{"name":"mbroadst","email":"mbroadst@gmail.com"},{"name":"hswolff","email":"hello@hswolff.com"},{"name":"satyasinha","email":"satya@mongodb.com"},{"name":"matt_d_rat","email":"matt@mattfairbrass.com"},{"name":"rhysm","email":"rhys.howell@10gen.com"},{"name":"tomhollander","email":"tomhollander@hotmail.com"},{"name":"alena.khineika","email":"alena.khineika@gmail.com"},{"name":"jeff-allen-mongo","email":"jeffrey.allen@10gen.com"},{"name":"mmarcon","email":"me@marcon.me"},{"name":"jonathan.balsano","email":"jonathan.balsano@mongodb.com"},{"name":"mongodb-build","email":"build-accounts@10gen.com"},{"name":"jack.weir","email":"johnjackweir@gmail.com"},{"name":"stennie","email":"stennie@cpan.org"},{"name":"mcasimir","email":"maurizio.cas@gmail.com"},{"name":"kristina.stefano","email":"kristina.stefanova@mongodb.com"},{"name":"jarjee","email":"nathan.smyth@10gen.com"},{"name":"shaketbaby","email":"shaketbaby@gmail.com"},{"name":"devtoolsbot","email":"iteng@mongodb.com"},{"name":"addaleax","email":"anna@addaleax.net"},{"name":"gribnoysup","email":"sergey.petushkov@protonmail.com"},{"name":"mutukrish","email":"mutukrish@gmail.com"},{"name":"imlucas","email":"hrabovsky.lucas@gmail.com"}],"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"dist":{"shasum":"a912e023dbcf3c6d82515626259d8b4b3c3113d5","tarball":"https://registry.npmjs.org/mongodb-index-model/-/mongodb-index-model-0.0.0-next-a863ce6adfb98ced08f9644a294f5b63b110c7d8.tgz","fileCount":9,"integrity":"sha512-XotdIUoR0kVKBvfr19LKfxRQ9ovt43FWQXD0GRlOM+zZz33as3drm0++Yw0vpK4BsSCRfjlCaGXBM4L6RKdFPQ==","signatures":[{"sig":"MEQCICQLYISrDHxILsPrdvIZPBwU7wVwCvODGJlMavhiEkeEAiAE5DAbruZdfOQVh+dyhk7mi/m1dLL1BxPxyCNCeR+qmg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47856,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkI0LSACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp20w/8C8OHzshBX7O5SJPCIIDoq1PsXfDPljpYcwq6cYyKZJubUiUh\r\nUFjaBsIwXWmKvChu4VDMbwsClVquPIHC77EdMODssNqFMbbba/OvInKDRmxd\r\ncRwriZ/emCPGr0FFvr6IRP8K5P0gvYDKOKjhSCsMvoMxa6JZEbJEoOL/S0jw\r\nNqd7cjDvpVQHcmLb3RJEi8unB5az1wPfFY/RvpCtb0uhO3HLf3mQuSAz82Wv\r\n/HHorDB7aWB8bhjBGvAVFrP3hDsOsSK6AZp0kZmKMNCdR+TaEqY7woJl/pVc\r\neb8s9PUAOBHBvb8Zoin7ROdrz2KrUr+Aw7MMeViaykMo0+AhrYh8B6HhscC8\r\npME6zrikQuWgsBc/95gK8bnmudBZ5DnBJ5Rps5PLAxr+d1tIUkB31oKczc+N\r\nVr+uNnhBHyM5asOO+38dish7kszU56AgP5aDR1IrwCkp80twwVYVwrLHjweP\r\nZl5Efci9HWim8iovpEaRjTD9+BoGXhdN+RBqd1htTyeSZhI8aJYbYkQRtSry\r\nIgYJ1AvTi7eZB7ZMpPozDVCEoLodERD67h1u+n6+5l+S4pm4cKFTKH9hBoyk\r\n9Njom1oFDThaNLI/H+QlhJo4B0VS3uxjtsLqS97I53o2g2/Efzha1V7RFGHO\r\nskoUZnwj0D1Svhi3sI2R90NT168ksMV1Zuw=\r\n=CUF3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# mongodb-index-model [![][npm_img]][npm_url]\n\n> MongoDB Index toolkit for humans.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n## Example\n\n```javascript\nvar IndexModel = require('mongodb-index-model');\n\n// e.g. from collection.getIndexes()\nvar indexDefs = [\n  {\n    'v': 1,\n    'key': {\n      '_id': 1\n    },\n    'name': '_id_',\n    'ns': 'mongodb.fanclub'\n  },\n  {\n    'v': 1,\n    'key': {\n      'last_login': -1\n    },\n    'name': 'last_login_-1',\n    'ns': 'mongodb.fanclub'\n  }\n];\n\nvar indexes = new IndexModel(indexDefs, {parse: true});\n\n// get index by `<namespace>.<name>`\nindexes.get('mongodb.fanclub.last_login_-1').compound  // returns `false`\n\n// get index by `<name>` (use `name` ampersand index)\nindexes.get('_id_', 'name').unique // returns `true`\n```\n\n## Installation\n\n```\nnpm install --save mongodb-index-model\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## Index Mental Model\n\n#### General\n\nA _collection_ can have many indexes.\nAn _index_ can have one or more field/value pairs.\nWe use JSON notation to represent and index definition as a document of field/value pairs, e.g. `{ last_name: 1, location: \"2dsphere\" }`.\nThe _index field_ corresponds to a field in the documents stored in the collection.\nThe _value_ defines the type, and possibly subtype or sort order of the index on this field.\nAn index can have additional properties.\n\n\n#### Index Field Types\n\nIndex field types are the following:\n\n- _regular_ (note: the MongoDB Documentation does not mention this type of index explicitly, but rather groups indexes into \"single\", \"compound\" and \"multi-key\". This distinction is not necessary here and would complicate the mental model). The values for regular index fields indicates sort order: `1` for ascending, or `-1` for descending sort order.\n- _text_, with the only possible value `text`\n- _hashed_, with the only possible value `hashed`\n- _geospatial_, where the value specifies the sub-type of geo index, which can be `2d` for a flat, cartesian geometry, `2dsphere` for an index assuming a spherical geometry, or `geoHaystack` for a (rarely used) haystack index.\n\nIn summary, given the different types of index and their allowed values, a field value in an index defintion can be one of: `1`, `-1`, `\"text\"`, `\"hashed\"`, `\"2d\"`, `\"2dsphere\"`, `\"geoHaystack\"`.\n\n\n#### Index Properties\n\nAn index can have one or more properties. These are independent of the fields and values and defined per index. Index properties are:\n\n- `TTL` \"time to live\", automatically deletes documents after some time.\n- `unique` enforces that no duplicate values exist for this field\n- `sparse` means documents without the specified field(s) are not indexed, default is that every document is indexed\n- `partial` takes a filter expression and only indexes documents matching that expression. similar to sparse but more flexible.\n\nIndex properties are specified as a separate second parameter to the `createIndex()` method. There are limitations which index types and properties can be used together, not every combination is possible.\n\n![Index Mental Model Diagram](./img/index_mental_model.png)\n\n[npm_img]: https://img.shields.io/npm/v/mongodb-index-model.svg\n[npm_url]: https://www.npmjs.org/package/mongodb-index-model\n","gitHead":"a863ce6adfb98ced08f9644a294f5b63b110c7d8","scripts":{"lint":"eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern","test":"mocha","check":"npm run lint && npm run depcheck","pretest":"mongodb-runner install && mongodb-runner start --port=27017","test-ci":"npm run test","depcheck":"depcheck","posttest":"mongodb-runner stop --port=27017","posttest-ci":"node ../../scripts/killall-mongo.js"},"_npmUser":{"name":"mcasimir","email":"maurizio.cas@gmail.com"},"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+x64 (linux)","description":"MongoDB index model","directories":{},"_nodeVersion":"16.17.0","compass:main":"index.js","dependencies":{"async":"^3.2.0","lodash":"^4.17.15","mongodb-ns":"^2.4.0","ampersand-model":"^8.0.1","mongodb-js-errors":"^0.5.0","ampersand-collection":"^2.0.1","ampersand-rest-collection":"^6.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"debug":"^4.2.0","mocha":"^10.2.0","eslint":"^7.25.0","mongodb":"^5.1.0","depcheck":"^1.4.1","mongodb-runner":"^4.10.0","eslint-config-mongodb-js":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/mongodb-index-model_0.0.0-next-a863ce6adfb98ced08f9644a294f5b63b110c7d8_1680032466739_0.5620960825088259","host":"s3://npm-registry-packages"}}},"time":{"created":"2015-08-12T12:17:36.497Z","modified":"2026-07-15T15:36:09.233Z","0.1.0":"2015-08-12T12:17:36.497Z","0.1.1":"2015-10-08T16:18:36.816Z","0.1.2":"2015-10-19T22:26:51.811Z","0.1.3":"2016-03-03T21:26:30.809Z","0.2.0":"2016-03-24T03:29:49.859Z","0.3.0":"2016-03-29T05:00:19.207Z","0.4.0":"2016-04-01T04:54:18.089Z","0.4.1":"2016-04-05T05:16:39.557Z","0.4.2":"2016-04-05T06:10:00.982Z","0.5.0":"2016-04-13T03:00:16.836Z","0.5.1":"2016-04-13T05:49:26.155Z","0.5.2":"2016-04-15T06:06:37.126Z","0.5.3":"2016-06-20T15:37:10.163Z","0.5.4":"2016-06-21T20:06:20.238Z","0.5.5":"2016-08-26T18:19:55.255Z","0.6.0":"2016-10-31T23:12:45.833Z","0.6.1":"2016-11-23T02:31:56.403Z","0.6.2":"2016-11-23T02:33:29.324Z","0.6.3":"2016-11-24T05:39:08.649Z","0.6.4":"2017-02-03T06:06:42.474Z","0.6.5":"2017-06-05T03:14:27.089Z","1.0.0":"2017-07-25T16:21:39.433Z","2.0.0":"2018-01-27T10:23:35.570Z","2.0.1":"2018-01-27T12:33:17.029Z","2.1.0":"2018-07-03T15:38:03.715Z","2.2.0":"2018-08-28T13:30:17.262Z","2.3.0":"2018-11-06T13:40:06.078Z","2.4.0":"2019-01-16T17:53:42.712Z","2.5.0":"2019-06-07T14:03:21.542Z","2.6.0":"2020-03-04T22:31:32.412Z","2.6.1":"2020-04-14T13:05:06.473Z","2.7.0":"2021-05-26T18:16:30.865Z","2.7.1":"2021-05-27T16:06:01.805Z","3.0.0":"2021-06-03T17:01:05.800Z","3.1.0":"2021-06-16T17:37:51.841Z","3.1.1":"2021-06-18T15:24:40.321Z","3.2.0":"2021-06-21T09:25:21.380Z","3.3.0":"2021-07-01T07:11:49.875Z","3.3.1":"2021-07-09T18:11:23.460Z","3.3.2":"2021-08-05T11:58:19.712Z","3.4.0":"2021-08-11T11:37:37.657Z","3.5.0":"2021-08-24T15:21:34.482Z","3.6.0":"2021-11-19T11:08:57.628Z","3.7.0":"2021-12-21T14:14:22.705Z","3.8.0":"2022-02-03T13:34:05.858Z","3.8.1":"2022-02-25T13:06:14.983Z","3.9.0":"2022-02-25T14:09:30.338Z","3.10.0":"2022-04-27T16:30:40.771Z","3.11.0":"2022-05-12T09:04:56.434Z","3.12.0":"2022-06-27T07:47:48.283Z","4.0.0":"2022-08-09T13:25:30.862Z","4.0.2":"2022-09-22T15:14:06.944Z","0.0.0-experimental-1c53312ce4905234885618d41ae95fde9c21aa18":"2022-09-26T13:16:58.455Z","0.0.0-next-e30a9e850a8a66b70770fbf6658a3e35cf1ff8b8":"2022-09-26T14:07:17.147Z","0.0.0-next-25b11de63d51aa4ca7fda0f3eae67999e3418ca5":"2022-09-28T16:53:54.955Z","0.0.0-next-dfa464112f63969f158bde32322e393fa2b77940":"2022-09-28T22:05:22.237Z","0.0.0-next-e42d58083be39ce9f112e6ec7f9fd1fdcb666e3e":"2022-09-29T16:07:29.634Z","0.0.0-next-5f69e8129e0242b4e507fee055188a8a83e1f1c1":"2022-10-05T11:10:46.743Z","0.0.0-next-823f55a862f13d28437b87fb594450b2208c0d4f":"2022-10-05T16:14:54.145Z","0.0.0-next-01a3ac56d52443bc859ccdcf7ed301ffbdea7a47":"2022-10-06T09:46:45.920Z","0.0.0-next-cd3c5c1303c464ef7900dc08adb8154d15c7f3a9":"2022-10-06T14:44:00.815Z","0.0.0-next-d9691f3c8230e21aeb2817ac2c984aba0d79f09c":"2022-10-07T19:44:33.272Z","0.0.0-next-1cb9ea1724d90e58422b33fe089df5b774e0be10":"2022-10-07T19:49:24.508Z","0.0.0-next-fcba5cfd8dce9be8022f245fef7a84f29a1cdcdd":"2022-10-07T19:51:35.185Z","0.0.0-next-4216a27cdf41425fff35938bb42040bb93c2d246":"2022-10-07T20:00:11.567Z","0.0.0-next-e3d7e58db726184c34e0d2d9f3342595a865eb55":"2022-11-01T17:36:15.670Z","0.0.0-next-dd9be0f790095ebc62a3de5b5f33543ff3c55cf3":"2022-11-02T09:11:05.513Z","0.0.0-next-10815be8fd57f3bfd89d061e1592eb7136d4a0fb":"2022-11-02T11:30:45.031Z","0.0.0-next-59e1f6f134da2a3417bd69a71c7788320608ee5d":"2022-11-04T03:10:03.483Z","0.0.0-next-ea4f317e964c0504e54c01d83c385280a9135bba":"2022-11-04T03:18:11.306Z","0.0.0-next-bfa0f33f79b0349abe5ad03576e17682f507fe04":"2022-11-08T21:27:16.439Z","0.0.0-next-5f5cecf01c890c348e17907482b03cea2f8c5f21":"2022-11-09T23:44:24.671Z","0.0.0-next-51a8e00f16dc1652cb0f0674c540570614a8895e":"2022-11-09T23:50:10.301Z","0.0.0-next-6d1491390706ac21857752412a5e4d10e112a29a":"2022-11-09T23:54:24.330Z","0.0.0-next-44318443f2cd1088082181789b25fc26a7a11bb2":"2022-11-09T23:56:03.814Z","0.0.0-next-3b50f8232d3349fe79554f36417d7fbb45b6352a":"2022-11-10T00:00:26.062Z","0.0.0-next-47b085701d7c0b212b54bcac46f6106d34ec429e":"2022-11-10T12:45:57.042Z","0.0.0-next-9e3b266e199e346a30e2c20aac373d48c2ea9888":"2022-11-11T20:43:35.686Z","0.0.0-next-91daa029e219b08cf0b775b6648d35867f2272d0":"2022-11-16T23:12:30.773Z","0.0.0-next-6aa8b22a0d621a03baf14775bda36ea4cee48a38":"2022-11-17T02:13:27.725Z","0.0.0-next-f81cf38005a73bccb0db48296f267b5f55774b50":"2022-11-17T02:35:39.039Z","0.0.0-next-27bdd4c654b0108a364c4bb3541996722734028c":"2022-11-17T02:40:43.092Z","0.0.0-next-7f1112246f97f222dc289edb7b9f0359d8f020cb":"2022-11-17T02:50:08.905Z","0.0.0-next-c12720c09369b6620405de027fa85d469db43e9c":"2022-11-18T04:59:39.703Z","0.0.0-next-2122563cf622c0d212372dee10ec2a4a664d8006":"2022-11-18T05:09:29.354Z","0.0.0-next-c31c6db319e5099ee073b5782609b1dcfa2370d8":"2022-11-19T06:50:11.710Z","0.0.0-next-981f8ae49e299320ca0add5ae8e58c8738baa699":"2022-11-19T07:03:54.216Z","0.0.0-next-6a646700444fec2ae51cd86f87f6a29e58f774b0":"2022-11-19T07:06:27.953Z","0.0.0-next-112bf8f8b20d7181824478f76e627ee32d6e03d7":"2022-11-19T20:42:32.247Z","0.0.0-next-19de7da29c34177349014132e37b723c1cb16ebd":"2022-11-19T22:16:54.874Z","0.0.0-next-1484036deb50fe0421bb8be4c48b2f9e56c17a46":"2022-11-22T02:40:43.104Z","0.0.0-next-6e34a0d07479c665cdfa3bddb6bfd864365f6b8a":"2022-11-22T02:41:34.586Z","0.0.0-next-31a3fe49cf0eba4c3afe85c4a4139ce198cb0e51":"2022-11-22T02:44:27.374Z","0.0.0-next-bb1a39e78c30cda5ef910174e54d2c9708186388":"2022-11-22T02:50:02.358Z","0.0.0-next-b5a88ca5d89936f4997a6df7c6e08614f25de0a1":"2022-11-22T02:52:10.319Z","0.0.0-next-9a3af5fc8cc6a9ccc96866e1b71d0a33c14d7c08":"2022-11-22T02:59:46.204Z","0.0.0-next-2cde0fe836b81baa0f68d274840a5f97b8dae0c6":"2022-11-22T03:04:57.132Z","0.0.0-next-feb0121be4234a831e6bce640173de34ce95dd7a":"2022-11-23T01:39:10.260Z","0.0.0-next-64ed9e6634006598c90fc79f71c554ec401bfc8e":"2022-11-23T02:15:52.236Z","0.0.0-next-a005ee4428ffd61a00127102fa0c29212a52fc83":"2022-11-24T03:21:55.123Z","0.0.0-next-e06434c386fd387cc5650fc9c0906b46cb4d6c34":"2022-11-24T03:35:40.264Z","0.0.0-next-8d44ba9084fbf5b834ca7df8b77135d3c8fc6896":"2022-11-24T20:19:55.902Z","0.0.0-next-74685ebe9d7b81dd4a870c8ffd51152622741526":"2022-11-24T20:26:22.695Z","0.0.0-next-92270b35885e90f6eb7b153275848f7a2be21278":"2022-11-25T10:01:27.751Z","0.0.0-next-f9347a106881d77aa4b1f7f37daed25d73c5f92c":"2022-11-25T22:47:18.440Z","0.0.0-next-94f03d5249971d1eea1868df296db6e766f40f9f":"2022-11-25T23:48:12.632Z","0.0.0-next-e3ac63bd187d674b27865523c639e78bf78ac7a1":"2022-11-28T22:09:47.447Z","0.0.0-next-1b4197ffe591babecd7ad111b8f4e8e12f94e0b3":"2022-11-28T22:20:28.495Z","0.0.0-next-aaccfd472a61651f2cd223e08a772916adea0d39":"2022-11-29T09:37:47.173Z","0.0.0-next-92d0020f1616b24273dd45bcadc1f36b47a690d7":"2022-11-29T09:38:54.500Z","4.1.0":"2022-11-29T13:43:37.699Z","0.0.0-next-449f5b693a70d24bf653fcbd3719d8d88d91d899":"2022-11-29T23:35:24.130Z","0.0.0-next-9ee9b0963df24390835a677f1a9081d9bc53ca2a":"2022-11-29T23:39:50.749Z","0.0.0-next-abcbfd525e6443433f1db3573c7fcb8067a4b2c9":"2022-11-30T05:11:11.051Z","0.0.0-next-98550b9ab2651e46658429899a0b7353249a18c0":"2022-12-01T09:46:58.703Z","0.0.0-next-f5e96f4dde195c3f4c44fc6c373583df1178a29d":"2022-12-01T23:16:51.494Z","0.0.0-next-21edffba0b9d147d7a297a3e4a69d68cdca09b82":"2022-12-01T23:28:29.558Z","0.0.0-next-6a5d526328ecfce1da82bf064daeb19f1c2bf6a5":"2022-12-04T22:31:31.130Z","0.0.0-next-aafcfc5ac487a7962baee26ca6c5870e66de2533":"2022-12-05T09:36:16.193Z","0.0.0-next-2f189f8218b434e8d36a7472a2ac843f17147b9b":"2022-12-06T00:52:21.392Z","0.0.0-next-faf899c161858cffa138dc64f4fbf9c0da2145e0":"2022-12-06T00:54:02.748Z","0.0.0-next-f5d7198f71e9d27890af5dc79d01c3950c637d49":"2022-12-07T17:14:01.433Z","0.0.0-next-1336f6ccd01a8b5f63ed6bea289fa9f8fc4d9557":"2022-12-09T02:44:18.492Z","0.0.0-next-d43728ce0cf99f511bd2d2aebad966bc49276179":"2022-12-09T02:46:44.247Z","0.0.0-next-0d9e77c42a99b49fd4ecc7167d0c769866f92ef2":"2022-12-09T02:56:23.338Z","0.0.0-next-ea6948309aa5e3478e4cda811ee6de9e7d7e0827":"2022-12-09T13:25:01.164Z","0.0.0-next-7db57a9d912a713312c9f79acdfcde9e49b554d9":"2022-12-09T18:24:20.127Z","0.0.0-next-907430527b638cb96704541b347715ec1dcc648b":"2022-12-12T21:33:04.949Z","0.0.0-next-3888dd701d06bedcc2b043270c5dc626b9997eb0":"2022-12-12T21:38:07.131Z","0.0.0-next-dc4590988660016a4419dbc587f3182af207ed15":"2022-12-14T18:28:20.428Z","0.0.0-next-384d29b0a9580a15a106637331eb1fe9f304acba":"2023-01-11T15:42:09.723Z","0.0.0-next-cbaa086f387b9c9b62aef9381297773a9794a200":"2023-01-13T15:10:44.897Z","0.0.0-next-cb3371cdb3289f37402f09c6388269e88c943a81":"2023-01-13T17:38:36.432Z","0.0.0-next-f6dcd616f47e1d3843402c3e0f47d541edec53f3":"2023-01-14T19:48:44.850Z","0.0.0-next-8ec9e3341a4516d0d09c0d9efbbb836758c48228":"2023-01-16T13:20:21.104Z","0.0.0-next-6900ac52ffc5e2e7ef959752bc33235dc12946e4":"2023-01-16T14:42:51.529Z","0.0.0-next-d09be9dbbff785d6692110b819e06b0186bd3ac7":"2023-01-16T21:59:26.098Z","0.0.0-next-4222a9637dad37c08ecb1baac59d26c8a4ecd88f":"2023-01-17T16:43:12.608Z","0.0.0-next-b72d7d0f94c6cd6b83966a08494549408ed56560":"2023-01-20T15:15:02.594Z","0.0.0-next-288585a9b69e86c5bb1bfcf4b6df1f5db45ad7bf":"2023-01-26T02:24:26.921Z","0.0.0-next-9c2b4b0b01c61fc3051beeb16fa883130e745d9b":"2023-02-02T04:11:09.507Z","4.1.1":"2023-02-02T09:36:40.638Z","0.0.0-next-cfe9a829fd77fc84e090f2c7b38663167071ebc5":"2023-02-02T22:41:36.494Z","0.0.0-next-6e4c984eb458cbfc675ec138ae979303ef32bcb5":"2023-02-02T23:24:59.488Z","0.0.0-next-1638fa3a4f457428151ba0ef06b33cfc4a77c896":"2023-02-04T16:24:47.742Z","0.0.0-next-3e67b8063fbcd84b0bfd6451e2568968fbdba25a":"2023-02-06T20:34:35.284Z","0.0.0-next-920407d9fa8e9bc60bfc2577492e5be59254432e":"2023-02-06T20:35:14.593Z","0.0.0-next-7bfb57937adf16eda85ca92547ea5711d120b4c1":"2023-02-06T20:38:39.637Z","0.0.0-next-3b389244f7eb06219ec1e923cac29b45a6ec3e84":"2023-02-06T20:39:59.867Z","0.0.0-next-014cd3f52319f9c3e62d458f4c10e0af7ae98052":"2023-02-13T23:32:36.348Z","0.0.0-next-887a3dabb2b894331aec6aa894bc425e2dc591b5":"2023-02-15T00:05:09.911Z","0.0.0-next-c5eba7335c2da0b9754b4e52495c98f48ec15463":"2023-02-15T10:49:15.783Z","0.0.0-next-9acb1d074fcbf6aa34b275f617178f0f155ff495":"2023-02-20T21:34:02.015Z","4.1.2":"2023-02-24T20:46:35.298Z","0.0.0-next-7675c98b3881009dcc19690b66a6e63e65e1a13c":"2023-02-26T18:50:54.981Z","0.0.0-next-e5f447d1d4e3c5e91efdf6c7e380240ff610dc24":"2023-03-02T08:38:39.497Z","0.0.0-next-e0e7275f55471eecce19ff3b75439fb06dce1fad":"2023-03-03T12:29:15.427Z","0.0.0-next-a8732fdbdeb3ad56ef759d7970565ccd371888eb":"2023-03-03T14:08:46.993Z","0.0.0-next-04ba59a8ace9d68fd90d540d8a8936985115e22e":"2023-03-18T12:33:34.368Z","0.0.0-next-ed8f90bd71f084cb541f99b15caf3833ec6a953c":"2023-03-20T20:56:55.189Z","0.0.0-next-97c3945c3938ec09f9aa141b791f53d15bd47600":"2023-03-20T20:57:39.003Z","0.0.0-next-d4e65fe0ae295543658a34afcb1bd79b9b5ecd75":"2023-03-28T15:29:50.726Z","0.0.0-next-3904cf8445c3449f8f87362208a2b0448f57aded":"2023-03-28T19:35:42.078Z","0.0.0-next-a863ce6adfb98ced08f9644a294f5b63b110c7d8":"2023-03-28T19:41:06.923Z"},"bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"author":{"name":"Lucas Hrabovsky","email":"lucas@mongodb.com"},"license":"SSPL","homepage":"https://github.com/mongodb-js/compass","keywords":["mongodb-js"],"repository":{"url":"git+https://github.com/mongodb-js/compass.git","type":"git"},"description":"MongoDB index model","maintainers":[{"email":"satya@mongodb.com","name":"satyasinha"},{"email":"kristina.stefanova@mongodb.com","name":"kristina.stefano"},{"email":"nathan.smyth@10gen.com","name":"jarjee"},{"email":"iteng@mongodb.com","name":"devtoolsbot"},{"email":"james.wang@mongodb.com","name":"mongo-j"},{"email":"neal.beeken@mongodb.com","name":"nbbeeken"},{"email":"dbx-node@mongodb.com","name":"dbx-node"},{"email":"devtools-npm-user@mongodb.com","name":"devtools-npm-user"},{"email":"hrabovsky.lucas@gmail.com","name":"imlucas"},{"email":"dana.groff+mongodb-js@mongodb.com","name":"mongodb-js-user"}],"readme":"","readmeFilename":""}