{"_id":"underscore-query","_rev":"40-ba9708d1bafd49f5462b63ed451cd988","name":"underscore-query","description":"Lightweight Query API library for Underscore and Lodash","dist-tags":{"latest":"3.3.2"},"versions":{"0.1.1":{"name":"underscore-query","description":"Lightweight Query API mixin for Underscore","version":"0.1.1","author":{"name":"Dave Tonge","email":"dave@simplecreativity.co.uk","url":"https://github.com/davidgtonge"},"tags":["underscore","mongo","query"],"main":"./underscore-query","repository":{"type":"git","url":"https://davidgtonge@github.com/davidgtonge/underscore-query.git"},"dependencies":{"underscore":">=1.1.x"},"devDependencies":{"coffee-script":">=1.x.x","mocha":"","uglify-js":"1.2.2"},"jam":{"dependencies":{"underscore":"*","jquery":"*"},"include":["underscore-query.js"],"main":"underscore-query.js","shim":{"deps":["underscore"]}},"scripts":{"test":"mocha"},"_id":"underscore-query@0.1.1","dist":{"shasum":"e648971d45a51b6a89ddf77abcfc947af089023a","tarball":"https://registry.npmjs.org/underscore-query/-/underscore-query-0.1.1.tgz","integrity":"sha512-xMI8er04hgtdg8mm0aZJsQwEyhY3cekmiBYT2z92HnM8XjeT9+f4x8u/qWNgtIiugkIfMNFZFNOzW84smhT1eg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCtz36uneZ6hjzX7C9VfAa/GtrtLkOwDhAQjZSh+ZKhZQIgI+Lj3xGuY3fXZnmjsrjP5c/xFxD4skKypiTDNX1nHro="}]},"_npmVersion":"1.1.65","_npmUser":{"name":"davidgtonge","email":"dave@simplecreativity.co.uk"},"maintainers":[{"name":"davidgtonge","email":"dave@simplecreativity.co.uk"}]},"0.1.3":{"name":"underscore-query","description":"Lightweight Query API mixin for Underscore","version":"0.1.3","author":{"name":"Dave Tonge","email":"dave@simplecreativity.co.uk","url":"https://github.com/davidgtonge"},"tags":["underscore","mongo","query"],"main":"./lib/underscore-query","repository":{"type":"git","url":"https://github.com/davidgtonge/underscore-query.git"},"dependencies":{"underscore":">=1.1.x"},"devDependencies":{"coffee-script":">=1.x.x","mocha":"","uglify-js":"1.2.2"},"scripts":{"test":"mocha"},"_id":"underscore-query@0.1.3","dist":{"shasum":"7a4a8c479f36cad48095054014d171ba6894a69d","tarball":"https://registry.npmjs.org/underscore-query/-/underscore-query-0.1.3.tgz","integrity":"sha512-rp9hi4AfCfk96rDnpIlCgQKcXS3j2KOK6se0h7N07y9LxGaBUPT0WR07lcI68e9WyU1Us6JpnQPJM1kdfFVcpw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBbgK6dBnkXwf1nwbuLBTTcnMYEyVr/q1qgBm6K5K6arAiAEHkZGBhuLl4x/KhAfJMvU4R/ERk5n6FjEENLd3Hrvqg=="}]},"_npmVersion":"1.1.65","_npmUser":{"name":"davidgtonge","email":"dave@simplecreativity.co.uk"},"maintainers":[{"name":"davidgtonge","email":"dave@simplecreativity.co.uk"}]},"0.1.4":{"name":"underscore-query","description":"Lightweight Query API mixin for Underscore","version":"0.1.4","author":{"name":"Dave Tonge","email":"dave@simplecreativity.co.uk","url":"https://github.com/davidgtonge"},"tags":["underscore","mongo","query"],"main":"./lib/underscore-query","repository":{"type":"git","url":"https://github.com/davidgtonge/underscore-query.git"},"dependencies":{"underscore":">=1.1.x"},"devDependencies":{"coffee-script":">=1.x.x","mocha":"","backbone":"","uglify-js":"1.2.2"},"scripts":{"test":"mocha"},"_id":"underscore-query@0.1.4","dist":{"shasum":"0a24f2f2a9b5e61cfac2bb9c3c6f603537a1d9e3","tarball":"https://registry.npmjs.org/underscore-query/-/underscore-query-0.1.4.tgz","integrity":"sha512-v0htxZtWRx2cOG8QOaKmBOcNVpTpriI26yo1XkoufYKefoDufEeMkbzX2qRErQS/KzLIvTL5z/Wo6pA2AesC7Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC9F2fplvqOlXIqXN1uii/0Jy6cHIzhYCjggomLhzTuGAIhANY0wOc9s7sERhKuPDrzmo8qQ6zzMikGp6AKEz3s7auS"}]},"_npmVersion":"1.1.65","_npmUser":{"name":"davidgtonge","email":"dave@simplecreativity.co.uk"},"maintainers":[{"name":"davidgtonge","email":"dave@simplecreativity.co.uk"}]},"0.2.0":{"name":"underscore-query","description":"Lightweight Query API mixin for Underscore","version":"0.2.0","author":{"name":"Dave Tonge","email":"dave@simplecreativity.co.uk","url":"https://github.com/davidgtonge"},"tags":["underscore","mongo","query"],"main":"./lib/underscore-query","repository":{"type":"git","url":"https://github.com/davidgtonge/underscore-query.git"},"dependencies":{"underscore":">=1.1.x"},"devDependencies":{"coffee-script":">=1.x.x","mocha":"","backbone":"","uglify-js":"1.2.2"},"scripts":{"test":"mocha"},"_id":"underscore-query@0.2.0","dist":{"shasum":"fd3a96af41cc27d557aa09e23300e5cf93b4a624","tarball":"https://registry.npmjs.org/underscore-query/-/underscore-query-0.2.0.tgz","integrity":"sha512-DqkH6382iRvtl9YBBGpD0rqSydrTPGH4GcybJftlTa5Hr3PzQ5pd76nBNqXvpN1nUJmhrD3R55caE4gwroW3qA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG6Fk3tykC9rWLATgCPyzeydQk0WlX1yM4ycMIKg9YzQAiEAzKNxaPxFO1kdno9z8IpLQWrCyrJK6h9EyxD+NEV2UXU="}]},"_npmVersion":"1.1.65","_npmUser":{"name":"davidgtonge","email":"dave@simplecreativity.co.uk"},"maintainers":[{"name":"davidgtonge","email":"dave@simplecreativity.co.uk"}]},"0.3.0":{"name":"underscore-query","description":"Lightweight Query API mixin for Underscore","version":"0.3.0","author":{"name":"Dave Tonge","email":"dave@simplecreativity.co.uk","url":"https://github.com/davidgtonge"},"tags":["underscore","mongo","query"],"main":"./lib/underscore-query","repository":{"type":"git","url":"https://github.com/davidgtonge/underscore-query.git"},"dependencies":{"underscore":">=1.1.x"},"devDependencies":{"coffee-script":">=1.x.x","mocha":"","backbone":"","uglify-js":"","handlebars":""},"scripts":{"test":"mocha"},"_id":"underscore-query@0.3.0","dist":{"shasum":"d49cc5b3c43dae53711b66769bcd0c58480fd600","tarball":"https://registry.npmjs.org/underscore-query/-/underscore-query-0.3.0.tgz","integrity":"sha512-gYCmZbTFIkt70oe6o2RLn6mylvsUXuZhkNoKxifGKkCFZQf2NC19Ds4WYBxjDoLtcGmPYpV4Fd1D8CPOEF1jsQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG3JN/ihe6QNb2m48kQZWwhe2N7fP2jKdlhMfxEyPAmhAiATqXxXqaneVO/WPNBCqg4FYR0tWnemfkJdsdm6t3DUnQ=="}]},"_from":".","_npmVersion":"1.2.18","_npmUser":{"name":"davidgtonge","email":"dave@simplecreativity.co.uk"},"maintainers":[{"name":"davidgtonge","email":"dave@simplecreativity.co.uk"}]},"0.4.0":{"name":"underscore-query","description":"Lightweight Query API mixin for Underscore or Lodash","version":"0.4.0","author":{"name":"Dave Tonge","email":"dave@simplecreativity.co.uk","url":"https://github.com/davidgtonge"},"tags":["underscore","mongo","lodash","query"],"main":"./lib/underscore-query","repository":{"type":"git","url":"https://github.com/davidgtonge/underscore-query.git"},"dependencies":{"underscore":">=1.1.x"},"devDependencies":{"coffee-script":">=1.x.x","mocha":"","backbone":"","uglify-js":"","handlebars":"","lodash":""},"scripts":{"test":"mocha"},"bugs":{"url":"https://github.com/davidgtonge/underscore-query/issues"},"_id":"underscore-query@0.4.0","dist":{"shasum":"fe40099f611d6613947b14053b0eb5bd817aa762","tarball":"https://registry.npmjs.org/underscore-query/-/underscore-query-0.4.0.tgz","integrity":"sha512-HmVZ0LSsTUFFEHYM1JgBNfknsw9Pu40H+FXvYy9dLPp43cEAcJ7JrmEK9suo1eKshPxMlMms1Dq5Xs2Ennb9rA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDSSZEYWqBYQgY3NlKXnuxBaqgOKnaoDeYJLm6Dc8dP4QIgEfabk/g88VnSjPDid20UurM2K9iYYfA/KqbbN5yd5bg="}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"davidgtonge","email":"dave@simplecreativity.co.uk"},"maintainers":[{"name":"davidgtonge","email":"dave@simplecreativity.co.uk"}]},"1.0.0":{"name":"underscore-query","description":"Lightweight Query API library for Underscore, Lodash or ES5","version":"1.0.0","author":{"name":"Dave Tonge","email":"dave@simplecreativity.co.uk","url":"https://github.com/davidgtonge"},"tags":["underscore","mongo","lodash","query"],"main":"./lib/underscore-query","repository":{"type":"git","url":"https://github.com/davidgtonge/underscore-query.git"},"dependencies":{"underscore":">=1.1.x"},"devDependencies":{"coffee-script":">=1.7.x","mocha":"","backbone":"","uglify-js":"","handlebars":"","lodash":""},"scripts":{"test":"mocha"},"gitHead":"e8ae8f85d0ba8d9481828d76e64ec9da9a1f88ca","bugs":{"url":"https://github.com/davidgtonge/underscore-query/issues"},"homepage":"https://github.com/davidgtonge/underscore-query","_id":"underscore-query@1.0.0","_shasum":"fd14264a69417b6750ed0cee09543a2ce7fb4eef","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"davidgtonge","email":"dave@simplecreativity.co.uk"},"maintainers":[{"name":"davidgtonge","email":"dave@simplecreativity.co.uk"}],"dist":{"shasum":"fd14264a69417b6750ed0cee09543a2ce7fb4eef","tarball":"https://registry.npmjs.org/underscore-query/-/underscore-query-1.0.0.tgz","integrity":"sha512-jTft4bvUGufJMpKrmlv2LzvOAx5Nyxx69+bmvPwl0rX23C8GCQ3cNQ3dOWSzXcfIokXZW/HOWzcbt999ApTTiw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD5IwihTdgMMXfLtcOz29A5zw+rsT5K4fEyCm2xT217YwIhAJptiNDo7LamgfksELt8Sscvp2oeyZrPt6tDBJ4jNMnr"}]}},"1.0.1":{"name":"underscore-query","description":"Lightweight Query API library for Underscore, Lodash or ES5","version":"1.0.1","author":{"name":"Dave Tonge","email":"dave@simplecreativity.co.uk","url":"https://github.com/davidgtonge"},"tags":["underscore","mongo","lodash","query"],"main":"./lib/underscore-query","repository":{"type":"git","url":"https://github.com/davidgtonge/underscore-query.git"},"dependencies":{"underscore":">=1.1.x"},"devDependencies":{"coffee-script":">=1.7.x","mocha":"","backbone":"","uglify-js":"","handlebars":"","lodash":""},"scripts":{"test":"mocha"},"gitHead":"7f333e7d7f781c6b07ed52f78ff7a3cd0fc3dfd2","bugs":{"url":"https://github.com/davidgtonge/underscore-query/issues"},"homepage":"https://github.com/davidgtonge/underscore-query","_id":"underscore-query@1.0.1","_shasum":"f05a324647de1241735ae0dd35c8ac2f2ca07cdc","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"davidgtonge","email":"dave@simplecreativity.co.uk"},"maintainers":[{"name":"davidgtonge","email":"dave@simplecreativity.co.uk"}],"dist":{"shasum":"f05a324647de1241735ae0dd35c8ac2f2ca07cdc","tarball":"https://registry.npmjs.org/underscore-query/-/underscore-query-1.0.1.tgz","integrity":"sha512-5lCoE8OYxbWFfgYrZypKu8XLF45PQNREvQqwZCgxPfSH01XhIy7/dGpc9NEU1s/p2MCh5KMOO+i/XRxCu6DNTw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCcmGBzbG114KpIFDZV604yWjbtDjBSti5uISYuSx6DnQIgKwHte45xEXVQOh35yilnCEcNeGEXlQC06N2zJIpeXao="}]}},"1.2.0":{"name":"underscore-query","description":"Lightweight Query API library for Underscore, Lodash or ES5","version":"1.2.0","author":{"name":"Dave Tonge","email":"dave@simplecreativity.co.uk","url":"https://github.com/davidgtonge"},"tags":["underscore","mongo","ES5","lodash","elasticsearch","score","boost","query"],"main":"./lib/underscore-query","repository":{"type":"git","url":"https://github.com/davidgtonge/underscore-query.git"},"dependencies":{"underscore":">=1.1.x"},"devDependencies":{"coffee-script":">=1.7.x","mocha":"","backbone":"","uglify-js":"","handlebars":"","lodash":""},"scripts":{"test":"mocha"},"gitHead":"b024d165ec98a9ab8a79133741940dd477d708f5","bugs":{"url":"https://github.com/davidgtonge/underscore-query/issues"},"homepage":"https://github.com/davidgtonge/underscore-query","_id":"underscore-query@1.2.0","_shasum":"d5b102515b2b3bb326df9c2599c07895de0a6672","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"davidgtonge","email":"dave@simplecreativity.co.uk"},"maintainers":[{"name":"davidgtonge","email":"dave@simplecreativity.co.uk"}],"dist":{"shasum":"d5b102515b2b3bb326df9c2599c07895de0a6672","tarball":"https://registry.npmjs.org/underscore-query/-/underscore-query-1.2.0.tgz","integrity":"sha512-j2ZTH8jBO+gNNdBfZn0vhpVOuOQ6sWEFrA3VifLajwKj+aVwlZkn9HYUZ6rQHN4ZSo1V00qUQzjJymHRujTQbw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCHpAEloRlD08QL0aV9I61XCT+U1TYbK3Or5JgxhvZowwIhAIfaAtCVF01+euDEYwykAnQX04PdfbafKD2co1ngJHL9"}]}},"1.2.1":{"name":"underscore-query","description":"Lightweight Query API library for Underscore, Lodash or ES5","version":"1.2.1","author":{"name":"Dave Tonge","email":"dave@simplecreativity.co.uk","url":"https://github.com/davidgtonge"},"tags":["underscore","mongo","ES5","lodash","elasticsearch","score","boost","query"],"main":"./lib/underscore-query","repository":{"type":"git","url":"https://github.com/davidgtonge/underscore-query.git"},"dependencies":{"underscore":">=1.1.x"},"devDependencies":{"coffee-script":">=1.7.x","mocha":"","backbone":"","uglify-js":"","handlebars":"","lodash":""},"scripts":{"test":"mocha"},"gitHead":"17a4757e04808f38aa9362c98e7bbed17f3146bd","bugs":{"url":"https://github.com/davidgtonge/underscore-query/issues"},"homepage":"https://github.com/davidgtonge/underscore-query","_id":"underscore-query@1.2.1","_shasum":"1cc16ad5a849826e0d3b2ebeac535f8f61562596","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"davidgtonge","email":"dave@simplecreativity.co.uk"},"maintainers":[{"name":"davidgtonge","email":"dave@simplecreativity.co.uk"}],"dist":{"shasum":"1cc16ad5a849826e0d3b2ebeac535f8f61562596","tarball":"https://registry.npmjs.org/underscore-query/-/underscore-query-1.2.1.tgz","integrity":"sha512-FinFPjqNYkMqoCqJEohNELmzLCnLbVUZI05k+QGzQGnHH4/4MLgSg4h41mVNSKoswFVpdxBBX7QeIYhMu6j6Dw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCpg/D0CKciWV0nWPmCgys1MiYJ2Vi4wLbphrR7hEnNOQIgVXm6TWLVK2lUO+u0p/K1hqn0+Csso6DYUCVeH4i70ro="}]}},"1.3.0":{"name":"underscore-query","description":"Lightweight Query API library for Underscore, Lodash or ES5","version":"1.3.0","author":{"name":"Dave Tonge","email":"dave@simplecreativity.co.uk","url":"https://github.com/davidgtonge"},"tags":["underscore","mongo","ES5","lodash","elasticsearch","score","boost","query"],"main":"./lib/underscore-query","repository":{"type":"git","url":"https://github.com/davidgtonge/underscore-query.git"},"dependencies":{"underscore":">=1.1.x"},"devDependencies":{"coffee-script":">=1.7.x","mocha":"","backbone":"","uglify-js":"","handlebars":"","lodash":""},"scripts":{"test":"mocha"},"gitHead":"7a03a16446ea618b5215ca9b50daed453d2def02","bugs":{"url":"https://github.com/davidgtonge/underscore-query/issues"},"homepage":"https://github.com/davidgtonge/underscore-query","_id":"underscore-query@1.3.0","_shasum":"23b0c9d210c18ce01ec9e40efe228da288f27b75","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"davidgtonge","email":"dave@simplecreativity.co.uk"},"maintainers":[{"name":"davidgtonge","email":"dave@simplecreativity.co.uk"}],"dist":{"shasum":"23b0c9d210c18ce01ec9e40efe228da288f27b75","tarball":"https://registry.npmjs.org/underscore-query/-/underscore-query-1.3.0.tgz","integrity":"sha512-zYejRcAaJlLMy60v6vDdwgz18za21O9cLa7agyvwVu8SexAd8T8W0Ma9If1Yf3ML/Od8AS8Fef0IGa3HtiB+bg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAZwX4KmMbh5VdeCedWjhsusOvIIBAqsVn5RSLFg45xLAiBtfgHHuPDEFaYl+aCFe7UX0RSNhpM3DDK2Gi7MVVogxQ=="}]}},"2.0.0":{"name":"underscore-query","description":"Lightweight Query API library for Underscore and Lodash","version":"2.0.0","author":{"name":"Dave Tonge","email":"dave.tonge@momentumft.co.uk","url":"https://github.com/davidgtonge"},"tags":["underscore","mongo","ES5","lodash","elasticsearch","score","boost","query"],"main":"./lib/underscore-query","repository":{"type":"git","url":"git+https://github.com/davidgtonge/underscore-query.git"},"dependencies":{},"devDependencies":{"coffee-script":">=1.7.x","mocha":"","backbone":"","uglify-js":"","handlebars":"","lodash":"3.x","underscore":">=1.6.x"},"scripts":{"test":"mocha","build":"cake build"},"gitHead":"00016dc20fea00df3efb2d7a0579fa5b51eef9c1","bugs":{"url":"https://github.com/davidgtonge/underscore-query/issues"},"homepage":"https://github.com/davidgtonge/underscore-query#readme","_id":"underscore-query@2.0.0","_shasum":"a1381f653287f68827176e56f63073994f581eac","_from":".","_npmVersion":"2.14.20","_nodeVersion":"4.4.1","_npmUser":{"name":"megawac","email":"megawac@gmail.com"},"dist":{"shasum":"a1381f653287f68827176e56f63073994f581eac","tarball":"https://registry.npmjs.org/underscore-query/-/underscore-query-2.0.0.tgz","integrity":"sha512-KeZShTv1kX2laVJx/v/Q4SO1nRtZnmCz6IhScnq3Fpa/ejLRvS89o9nNxntAQyTyYhbB91Yp/vBKf6dqJ0Ku5w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDAncEyqoriFYj1FAtjG9fnU/UcYfXe6iLLS8+AETGrgAIhAK63lPgVHhrkqt4yEQ0meySbbdrLdzoUqoK6H7FieW4Y"}]},"maintainers":[{"name":"davidgtonge","email":"dave.tonge@moneyhub.co.uk"},{"name":"megawac","email":"megawac@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/underscore-query-2.0.0.tgz_1460494577429_0.6502956082113087"}},"2.1.0":{"name":"underscore-query","description":"Lightweight Query API library for Underscore and Lodash","version":"2.1.0","author":{"name":"Dave Tonge","email":"dave.tonge@momentumft.co.uk","url":"https://github.com/davidgtonge"},"tags":["underscore","mongo","ES5","lodash","elasticsearch","score","boost","query"],"main":"./lib/underscore-query","repository":{"type":"git","url":"git+https://github.com/davidgtonge/underscore-query.git"},"dependencies":{},"devDependencies":{"coffee-script":">=1.7.x","mocha":"","backbone":"","uglify-js":"","handlebars":"","lodash":"3.x","underscore":">=1.6.x"},"scripts":{"test":"mocha","build":"cake build"},"gitHead":"1a91cdff0098564a0a15ec8931728903bc165933","bugs":{"url":"https://github.com/davidgtonge/underscore-query/issues"},"homepage":"https://github.com/davidgtonge/underscore-query#readme","_id":"underscore-query@2.1.0","_shasum":"2454d07c37bb90c8c71380d1eec5e614b4a62645","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.2","_npmUser":{"name":"megawac","email":"megawac@gmail.com"},"dist":{"shasum":"2454d07c37bb90c8c71380d1eec5e614b4a62645","tarball":"https://registry.npmjs.org/underscore-query/-/underscore-query-2.1.0.tgz","integrity":"sha512-Or8Vno4MP5Qwz2/Dzdh3HyTgLtiOAgmbI1Zm8GHlPn8HeM4SGdDKxH9OsMbs86a1vcShg3quDPpxcVfOZYAqhg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICuolzzywqvQTJF5mmA8PJ9TaKfj72CWNXznM75VGnEIAiEA5NO4HzCDd7KXwD1EBDv+/aJ5EVazMu6FnQVHs1dpTAg="}]},"maintainers":[{"name":"davidgtonge","email":"dave.tonge@moneyhub.co.uk"},{"name":"megawac","email":"megawac@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/underscore-query-2.1.0.tgz_1461601522711_0.8252853122539818"}},"2.1.1":{"name":"underscore-query","description":"Lightweight Query API library for Underscore and Lodash","version":"2.1.1","author":{"name":"Dave Tonge","email":"dave.tonge@momentumft.co.uk","url":"https://github.com/davidgtonge"},"tags":["underscore","mongo","ES5","lodash","elasticsearch","score","boost","query"],"main":"./lib/underscore-query","repository":{"type":"git","url":"git+https://github.com/davidgtonge/underscore-query.git"},"dependencies":{},"devDependencies":{"coffee-script":">=1.7.x","mocha":"","backbone":"","uglify-js":"","handlebars":"","lodash":"3.x","underscore":">=1.6.x"},"scripts":{"test":"mocha","build":"cake build"},"gitHead":"a88d56f3a78ae77f2ff33a5a94c836561b71af45","bugs":{"url":"https://github.com/davidgtonge/underscore-query/issues"},"homepage":"https://github.com/davidgtonge/underscore-query#readme","_id":"underscore-query@2.1.1","_shasum":"076393a0a33ce2c9e85f9651c630e9499a972228","_from":".","_npmVersion":"3.8.6","_nodeVersion":"6.0.0","_npmUser":{"name":"davidgtonge","email":"dave.tonge@moneyhub.co.uk"},"dist":{"shasum":"076393a0a33ce2c9e85f9651c630e9499a972228","tarball":"https://registry.npmjs.org/underscore-query/-/underscore-query-2.1.1.tgz","integrity":"sha512-eIa6HAB/SP4UpnqvmoKMyY3q9NgVrHBVi4191LT7FPcUYSe89x2v0dZ7zzlR1Kxf+Io+1RKO9kPnsK0dfGMecA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDD/rSKNJcXhtHiF4HFXi6J7cMAmJ7R29LXnMayv6hJcAiEAz2UU/PoklmV088sOEMvgPxHs55UaOvRPJBXdmugZU2I="}]},"maintainers":[{"name":"davidgtonge","email":"dave.tonge@moneyhub.co.uk"},{"name":"megawac","email":"megawac@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/underscore-query-2.1.1.tgz_1463434960415_0.6851063009817153"}},"3.0.1":{"name":"underscore-query","description":"Lightweight Query API library for Underscore and Lodash","version":"3.0.1","author":{"name":"Dave Tonge","email":"dave.tonge@momentumft.co.uk","url":"https://github.com/davidgtonge"},"tags":["underscore","mongo","ES5","lodash","elasticsearch","score","boost","query"],"main":"./lib/underscore-query","repository":{"type":"git","url":"git+https://github.com/davidgtonge/underscore-query.git"},"dependencies":{},"devDependencies":{"coffee-script":">=1.7.x","mocha":"","backbone":"","uglify-js":"","handlebars":"","lodash":"3.x","underscore":">=1.6.x"},"scripts":{"test":"mocha","build":"cake build"},"gitHead":"7a30af398e433bceb83401a1750da0fc0f70e306","bugs":{"url":"https://github.com/davidgtonge/underscore-query/issues"},"homepage":"https://github.com/davidgtonge/underscore-query#readme","_id":"underscore-query@3.0.1","_shasum":"58aa7d10731e70d7b66fa494d07d60743e7e8ff5","_from":".","_npmVersion":"3.8.6","_nodeVersion":"6.0.0","_npmUser":{"name":"davidgtonge","email":"dave.tonge@moneyhub.co.uk"},"dist":{"shasum":"58aa7d10731e70d7b66fa494d07d60743e7e8ff5","tarball":"https://registry.npmjs.org/underscore-query/-/underscore-query-3.0.1.tgz","integrity":"sha512-sbR4oeOfwJxsefpM0q4EzOzY4rZ8pNh2aooolQqTKA0bL9fgkuyO6zSR0qX1cExCS4CXhzLPV7Gfgn29NPrwcw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA65E63tutEWHZIWqImz5BA7PgkIJi5hBRJ/Mb60qnTvAiBuhjbAmqeAJ2Cg7oS0+xzVDByWqXPpGl4j6oz/C0YvEg=="}]},"maintainers":[{"name":"davidgtonge","email":"dave.tonge@moneyhub.co.uk"},{"name":"megawac","email":"megawac@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/underscore-query-3.0.1.tgz_1463435029220_0.6359285381622612"}},"3.1.0":{"name":"underscore-query","description":"Lightweight Query API library for Underscore and Lodash","version":"3.1.0","author":{"name":"Dave Tonge","email":"dave.tonge@momentumft.co.uk","url":"https://github.com/davidgtonge"},"tags":["underscore","mongo","ES5","lodash","elasticsearch","score","boost","query"],"main":"./lib/underscore-query","repository":{"type":"git","url":"git+https://github.com/davidgtonge/underscore-query.git"},"dependencies":{},"devDependencies":{"coffee-script":">=1.7.x","mocha":"","backbone":"","uglify-js":"","handlebars":"","lodash":"3.x","underscore":">=1.6.x"},"scripts":{"test":"mocha","build":"cake build"},"gitHead":"661b734b00cbffb4385a32bf4d3f92705426a7a7","bugs":{"url":"https://github.com/davidgtonge/underscore-query/issues"},"homepage":"https://github.com/davidgtonge/underscore-query#readme","_id":"underscore-query@3.1.0","_shasum":"00dde4f740413599b413f64262839c7c954f06b4","_from":".","_npmVersion":"3.8.6","_nodeVersion":"6.0.0","_npmUser":{"name":"megawac","email":"megawac@gmail.com"},"dist":{"shasum":"00dde4f740413599b413f64262839c7c954f06b4","tarball":"https://registry.npmjs.org/underscore-query/-/underscore-query-3.1.0.tgz","integrity":"sha512-kuH2ZS9rR4UEAiNb+GRUIvN8oA3NP9uCyyhp+VM/IwGJwaqhh72V12HFufvfnx2f34G91022SKG+UPSzhiEhjw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCDtQP8KYqzOvqbHeJPYVkQWaqxgMDdcfDiPek1sraLKQIhAIGXZ8DgHwRs+a1xT8m22ADOV0BF5DFO3ZWOCrxi6ZWw"}]},"maintainers":[{"name":"davidgtonge","email":"dave.tonge@moneyhub.co.uk"},{"name":"megawac","email":"megawac@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/underscore-query-3.1.0.tgz_1463511575515_0.951718935277313"}},"3.2.1":{"name":"underscore-query","description":"Lightweight Query API library for Underscore and Lodash","version":"3.2.1","author":{"name":"Dave Tonge","email":"dave.tonge@momentumft.co.uk","url":"https://github.com/davidgtonge"},"tags":["underscore","mongo","ES5","lodash","elasticsearch","score","boost","query"],"main":"./lib/underscore-query","repository":{"type":"git","url":"git+https://github.com/davidgtonge/underscore-query.git"},"dependencies":{},"devDependencies":{"coffee-script":">=1.7.x","mocha":"","backbone":"","uglify-js":"","handlebars":"","lodash":"3.x","underscore":">=1.6.x"},"scripts":{"test":"mocha","build":"cake build","prepublish":"npm run build"},"gitHead":"a8e00d9816b7f87368a4a54ba6d47e1bef99593f","bugs":{"url":"https://github.com/davidgtonge/underscore-query/issues"},"homepage":"https://github.com/davidgtonge/underscore-query#readme","_id":"underscore-query@3.2.1","_shasum":"08104f0cc2b4cc4dfd37ba710c470decdaf76134","_from":".","_npmVersion":"3.8.6","_nodeVersion":"6.0.0","_npmUser":{"name":"megawac","email":"megawac@gmail.com"},"dist":{"shasum":"08104f0cc2b4cc4dfd37ba710c470decdaf76134","tarball":"https://registry.npmjs.org/underscore-query/-/underscore-query-3.2.1.tgz","integrity":"sha512-62iRdXsC5q3YFPDHbYgS9Cvg02WYkqbV33QElJyySlX9IQYE/+OGHM+8DxtDbZAnmTK8POEmIV/a/2WJK/WDMg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE4tPR/lwn7oPWWFtsyF8gFCGUr+Q48XH92i19ewoeP5AiEAoTSqOsfQlitqmPcFC+dHH8daxTah7+lLuRdMNbfcx4s="}]},"maintainers":[{"name":"davidgtonge","email":"dave.tonge@moneyhub.co.uk"},{"name":"megawac","email":"megawac@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/underscore-query-3.2.1.tgz_1463590932205_0.22580308839678764"}},"3.3.0":{"name":"underscore-query","description":"Lightweight Query API library for Underscore and Lodash","version":"3.3.0","author":{"name":"Dave Tonge","email":"dave.tonge@momentumft.co.uk","url":"https://github.com/davidgtonge"},"tags":["underscore","mongo","ES5","lodash","elasticsearch","score","boost","query"],"main":"./lib/underscore-query","repository":{"type":"git","url":"git+https://github.com/davidgtonge/underscore-query.git"},"dependencies":{},"devDependencies":{"coffee-script":">=1.7.x","mocha":"","backbone":"","uglify-js":"","handlebars":"","lodash":"3.x","underscore":">=1.6.x"},"scripts":{"test":"mocha","build":"cake build","prepublish":"npm run build"},"gitHead":"b08ef9dd5cd397c70481036ed5d4207494121fb9","bugs":{"url":"https://github.com/davidgtonge/underscore-query/issues"},"homepage":"https://github.com/davidgtonge/underscore-query#readme","_id":"underscore-query@3.3.0","_shasum":"4380ef3257bb2c5e3813f7c2e6a65e810f209cf7","_from":".","_npmVersion":"2.15.1","_nodeVersion":"4.4.3","_npmUser":{"name":"megawac","email":"megawac@gmail.com"},"dist":{"shasum":"4380ef3257bb2c5e3813f7c2e6a65e810f209cf7","tarball":"https://registry.npmjs.org/underscore-query/-/underscore-query-3.3.0.tgz","integrity":"sha512-LHlEJiHH6/vRP9EWe9jyXuE6AqvsnpwHQD+dgR64YBcvTqSHMMxomafIZ+gDMIX6SsGUY9bFTxI+Bx6PRFslGw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICyEXt986v1HUOvtExGN7x0gHPzwtmJx81CJKxZ2XoR6AiEA19lIlU3BiTcijoeTzzbQnlCiZQtVd3yz3bF22jHQJeg="}]},"maintainers":[{"name":"davidgtonge","email":"dave.tonge@moneyhub.co.uk"},{"name":"megawac","email":"megawac@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/underscore-query-3.3.0.tgz_1463766045971_0.3647231182549149"}},"3.3.1":{"name":"underscore-query","description":"Lightweight Query API library for Underscore and Lodash","version":"3.3.1","author":{"name":"Dave Tonge","email":"dave.tonge@momentumft.co.uk","url":"https://github.com/davidgtonge"},"tags":["underscore","mongo","ES5","lodash","elasticsearch","score","boost","query"],"main":"./lib/underscore-query","repository":{"type":"git","url":"git+https://github.com/davidgtonge/underscore-query.git"},"dependencies":{},"devDependencies":{"coffee-script":">=1.7.x","mocha":"","backbone":"","uglify-js":"","handlebars":"","lodash":"3.x","underscore":">=1.6.x"},"scripts":{"test":"mocha","build":"cake build","prepublish":"npm run build"},"gitHead":"b4ab9ae23365090606943da6703a7f1168cabd87","bugs":{"url":"https://github.com/davidgtonge/underscore-query/issues"},"homepage":"https://github.com/davidgtonge/underscore-query#readme","_id":"underscore-query@3.3.1","_shasum":"142e1e1b527045cf160d2dc8c7a115a5ee6084b1","_from":".","_npmVersion":"2.15.4","_nodeVersion":"0.12.7","_npmUser":{"name":"davidgtonge","email":"dave.tonge@moneyhub.co.uk"},"dist":{"shasum":"142e1e1b527045cf160d2dc8c7a115a5ee6084b1","tarball":"https://registry.npmjs.org/underscore-query/-/underscore-query-3.3.1.tgz","integrity":"sha512-nmHg/y6xc4WE1OXOgbNzuWMccygLPNiHuLnO9+YNoEAVsjbJsAu1ptzWZstY7lQLeL8Asg83H/9slC2JJ+YNlw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHVpzYzM3Pf2NBbZ3Jt6HmJztgGLVHPp7toyTZ2DjkV+AiAdyWC17yveGhKmu6v2q9lwv21ngSPDOY9XfNof43/W/A=="}]},"maintainers":[{"name":"davidgtonge","email":"dave.tonge@moneyhub.co.uk"},{"name":"megawac","email":"megawac@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/underscore-query-3.3.1.tgz_1470158304910_0.6408701306208968"}},"3.3.2":{"name":"underscore-query","description":"Lightweight Query API library for Underscore and Lodash","version":"3.3.2","author":{"name":"Dave Tonge","email":"dave.tonge@momentumft.co.uk","url":"https://github.com/davidgtonge"},"tags":["underscore","mongo","ES5","lodash","elasticsearch","score","boost","query"],"main":"./lib/underscore-query","repository":{"type":"git","url":"git+https://github.com/davidgtonge/underscore-query.git"},"dependencies":{},"devDependencies":{"coffee-script":">=1.7.x","mocha":"","backbone":"","uglify-js":"","handlebars":"","lodash":"3.x","underscore":">=1.6.x"},"scripts":{"test":"mocha","build":"cake build","prepublish":"npm run build"},"gitHead":"119b6ca3d125fe1ef9816fe20c1380bf7217da92","bugs":{"url":"https://github.com/davidgtonge/underscore-query/issues"},"homepage":"https://github.com/davidgtonge/underscore-query#readme","_id":"underscore-query@3.3.2","_shasum":"a3788afd853476c4bacf6999dd24edff63ca1b71","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.5.0","_npmUser":{"name":"megawac","email":"megawac@gmail.com"},"dist":{"shasum":"a3788afd853476c4bacf6999dd24edff63ca1b71","tarball":"https://registry.npmjs.org/underscore-query/-/underscore-query-3.3.2.tgz","integrity":"sha512-nG78eCFq74hepytTnvFMGdt2YZXkBsYcpxJqFnuzytvNBbgAXOm6m9KFuFAMcFzslyJyh8MQGroaJS4PZdbwBQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDPehb9e/kSwEYcG17iiN85OKUj8lU8a2JpXv7tFC6LIQIhANuPaQRA70LRynnFbOIBq+An2eUjddSfWmqn/+UZKv25"}]},"maintainers":[{"name":"davidgtonge","email":"dave.tonge@moneyhub.co.uk"},{"name":"megawac","email":"megawac@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/underscore-query-3.3.2.tgz_1473710404998_0.28435365413315594"}}},"readme":"underscore-query (v2.0)\n===================\n\n[![Build Status](https://secure.travis-ci.org/davidgtonge/underscore-query.png)](http://travis-ci.org/davidgtonge/underscore-query)\n\nA lightweight query API plugin for Underscore.js - works in the Browser and on the Server.\nThis project was originally [Backbone Query](https://github.com/davidgtonge/backbone_query), however I found that it\nwas useful to have the ability to query arrays as well as Backbone Collections. So the library has been ported to\nunderscore, and backbone-query now uses underscore-query.\n\nIn updating the prokect serveral new features have been added, including the ability to use a chainable query api.\n\n### Features\n\n - Search for objects with a Query API similar to [MongoDB](http://www.mongodb.org/display/DOCS/Advanced+Queries)\n - Use a complex query object, or build queries up with a chainable api\n - Full support for compound queries ($not, $nor, $or, $and), including nested compound queries.\n - Full support for querying nested arrays (see `$elemMatch`)\n - Accepts dot notation to query deep properties (e.g. `{\"stats.views.december\": 100}`)\n - Custom getters can be defined, (e.g. `.get` for Backbone)\n - Works well with underscore chaining\n - Dynamically evaluates functions on query (e.g. `{\"startTime\": {$gt: () => new Date}}` will ensure `startTime` property is greater than now)\n\nPlease report any bugs, feature requests in the issue tracker.\nPull requests are welcome!\n\n\nInstallation\n============\n\n#### Client Side Installation:\nTo install, include the `lib/underscore-query.min.js` file in your HTML page, after Underscore (or Lodash).\n`_.query` will now be available for you to use.\n\nIf you use AMD, then you can use \"lib/underscore-query.amd.js\".\nThis will return a function that accepts either underscore or lodash. This function\nalso accepts an optional boolean argument on whether to mixin the query methods to underscore/lodash.\nIf you are using AMD and you want the methods mixed in, then you'd only need to require \"underscore-query\" once\nprobably in your init script:\n\n```js\ndefine('myModule',\n    ['underscore', 'underscore-query'],\n    function ( _, underscoreQuery ) {\n        // opt 1\n        underscoreQuery(_); // _.query is now available on the underscore module\n        // opt 2\n        var query = underscoreQuery(_, false) // query is available as a local variable with all the query methods\n    }\n```\n\n#### Server side (node.js) installation\nYou can install with NPM: `npm install underscore-query`\nThe library can work with either lodash or underscore, when you first require it in it exposes a method that takes\neither underscore or lodash:\n\n```ja\n// With Underscore\n_ = require(\"underscore\");\nrequire(\"underscore-query\")(_);\n\n// With Lodash\n_ = require(\"lodash\");\nrequire(\"underscore-query\")(_);\n\n// If you don't want the query methods 'mixed in'\n_ = require(\"underscore\");\nquery = require(\"underscore-query\")(_, false);\n```\n\n\n\nBasic Usage\n===========\n\nThe following are some basic examples:\n\n```js\n_.query( MyCollection, {\n    featured:true, \n    likes: {$gt:10}\n});\n// Returns all models where the featured attribute is true and there are\n// more than 10 likes\n\n_.query( MyCollection, {tags: { $any: [\"coffeescript\", \"backbone\", \"mvc\"]}});\n// Finds models that have either \"coffeescript\", \"backbone\", \"mvc\" in their \"tags\" attribute\n\n_.query(MyCollection, {\n  // Models must match all these queries\n  $and: [\n    {title: {$like: \"news\"}}, // Title attribute contains the string \"news\"\n    {likes: {$gt: 10}}\n  ], // Likes attribute is greater than 10\n\n  // Models must match one of these queries\n  $or: [\n    {featured: true}, // Featured attribute is true\n    {category:{$in:[\"code\",\"programming\",\"javascript\"]}}\n  ]\n  //Category attribute is either \"code\", \"programming\", or \"javascript\"\n});\n\ntitles = _.query.build( MyCollection )\n  .and(\"published\", true)\n  .or(\"likes\", {$gt:10})\n  .or(\"tags\":[\"javascript\", \"coffeescript\"])\n  .chain()\n  .sortBy(_.query.get(\"likes\"))\n  .pluck(\"title\")\n  .value();\n// Builds a query up programatically\n// Runs the query, sort's by likes, and plucks the titles.\n\n\nquery = _.query.build()\n  .and(\"published\", true)\n  .or(\"likes\", {$gt:10})\n  .or(\"tags\":[\"javascript\", \"coffeescript\"])\n\nresultsA = query.all(collectionA)\nresultsB = query.all(collectionB)\n// Builds a query and then runs it on 2 seperate collections\n\n```\n\nOr if CoffeeScript is your thing (the source is written in CoffeeScript), try this:\n\n```coffeescript\n_.query MyCollection,\n  $and: [\n    likes: $lt: 15\n  ]\n  $or: [\n    {content: $like: \"news\"}\n    {featured: $exists: true}\n  ]\n  $not:\n    colors: $contains: \"yellow\"\n```\n\n\n\nQuery API\n===\n\n### $equal\nPerforms a strict equality test using `===`. If no operator is provided and the query value isn't a regex then `$equal` is assumed.\n\nIf the attribute in the model is an array then the query value is searched for in the array in the same way as `$contains`\n\nIf the query value is an object (including array) then a deep comparison is performed using underscores `_.isEqual`\n\n```javascript\n_.query( MyCollection, { title:\"Test\" });\n// Returns all models which have a \"title\" attribute of \"Test\"\n\n_.query( MyCollection, { title: {$equal:\"Test\"} }); // Same as above\n\n_.query( MyCollection, { colors: \"red\" });\n// Returns models which contain the value \"red\" in a \"colors\" attribute that is an array.\n\nMyCollection.query ({ colors: [\"red\", \"yellow\"] });\n// Returns models which contain a colors attribute with the array [\"red\", \"yellow\"]\n```\n\n### $contains\nAssumes that the model property is an array and searches for the query value in the array\n\n```js\n_.query( MyCollection, { colors: {$contains: \"red\"} });\n// Returns models which contain the value \"red\" in a \"colors\" attribute that is an array.\n// e.g. a model with this attribute colors:[\"red\",\"yellow\",\"blue\"] would be returned\n```\n\n### $ne\n\"Not equal\", the opposite of $equal, returns all models which don't have the query value\n\n```js\n_.query( MyCollection, { title: {$ne:\"Test\"} });\n// Returns all models which don't have a \"title\" attribute of \"Test\"\n```\n\n### $lt, $lte, $gt, $gte\nThese conditional operators can be used for greater than and less than comparisons in queries\n\n```js\n_.query( MyCollection, { likes: {$lt: () -> 10} });\n// Returns all models which have a \"likes\" attribute of less than 10\n_.query( MyCollection, { likes: {$lte: () -> 10} });\n// Returns all models which have a \"likes\" attribute of less than or equal to 10\n_.query( MyCollection, { likes: {$gt:10} });\n// Returns all models which have a \"likes\" attribute of greater than 10\n_.query( MyCollection, { likes: {$gte:10} });\n// Returns all models which have a \"likes\" attribute of greater than or equal to 10\n```\n\nThese may further be combined:\n\n```js\n_.query( MyCollection, { likes: {$gt:2, $lt:20} });\n// Returns all models which have a \"likes\" attribute of greater than 2 or less than 20\n// This example is also equivalent to $between: [2,20]\n_.query( MyCollection, { likes: {$gte:2, $lte:20} });\n// Returns all models which have a \"likes\" attribute of greater than or equal to 2, and less than or equal to 20\n_.query( MyCollection, { likes: {$gte:2, $lte: 20, $ne: 12} });\n// Returns all models which have a \"likes\" attribute between 2 and 20 inclusive, but not equal to 12\n```\n\n\n\n### $between, $betweene\nTo check if a value is in-between 2 query values use the $between operator and supply an array with the min and max value\n\n```js\n// Returns all models which have a \"likes\" attribute of greater than 5 and less than 15\n_.query( MyCollection, { likes: {$between:[5,15] } });\n// Returns all models which have a \"likes\" attribute of greater-equal-to  5 and less-equal-to 15\n_.query( MyCollection, { likes: {$betweene:[5,15] } });\n```\n\n### $in\nAn array of possible values can be supplied using $in, a model will be returned if any of the supplied values is matched\n\n```js\n_.query( MyCollection, { title: {$in:[\"About\", \"Home\", \"Contact\"] } });\n// Returns all models which have a title attribute of either \"About\", \"Home\", or \"Contact\"\n```\n\n### $nin\n\"Not in\", the opposite of $in. A model will be returned if none of the supplied values is matched\n\n```js\n_.query( MyCollection, { title: {$nin:[\"About\", \"Home\", \"Contact\"] } });\n// Returns all models which don't have a title attribute of either\n// \"About\", \"Home\", or \"Contact\"\n```\n\n### $all\nAssumes the model property is an array and only returns models where all supplied values are matched.\n\n```js\n_.query( MyCollection, { colors: {$all:[\"red\", \"yellow\"] } });\n// Returns all models which have \"red\" and \"yellow\" in their colors attribute.\n// A model with the attribute colors:[\"red\",\"yellow\",\"blue\"] would be returned\n// But a model with the attribute colors:[\"red\",\"blue\"] would not be returned\n```\n\n### $any\nAssumes the model property is an array and returns models where any of the supplied values are matched.\n\n```js\n_.query( MyCollection, { colors: {$any:[\"red\", \"yellow\"] } });\n// Returns models which have either \"red\" or \"yellow\" in their colors attribute.\n```\n\n### $none\nInverse of $any. Returns an array of items where none of the results match\n\n```js\n_.query( MyCollection, { colors: {$none:[\"yellow\", \"black\"] } });\n// Returns models which are neither \"black\" or \"yellow\" in their colors attribute.\n```\n\n### $size\nAssumes the model property has a length (i.e. is either an array or a string).\nOnly returns models the model property's length matches the supplied values\n\n```js\n_.query( MyCollection, { colors: {$size:2 } });\n// Returns all models which 2 values in the colors attribute\n```\n\n### $exists or $has\nChecks for the existence of an attribute. Can be supplied either true or false.\n\n```js\n_.query( MyCollection, { title: {$exists: true } });\n// Returns all models which have a \"title\" attribute\n_.query( MyCollection, { title: {$has: false } });\n// Returns all models which don't have a \"title\" attribute\n```\n\n### $like\nAssumes the model attribute is a string and checks if the supplied query value is a substring of the property.\nUses indexOf rather than regex for performance reasons\n\n```js\n_.query( MyCollection, { title: {$like: \"Test\" } });\n//Returns all models which have a \"title\" attribute that\n//contains the string \"Test\", e.g. \"Testing\", \"Tests\", \"Test\", etc.\n```\n\n### $likeI\nThe same as above but performs a case insensitive search using indexOf and toLowerCase (still faster than Regex)\n\n```js\n_.query( MyCollection, { title: {$likeI: \"Test\" } });\n//Returns all models which have a \"title\" attribute that\n//contains the string \"Test\", \"test\", \"tEst\",\"tesT\", etc.\n```\n\n### $regex\nChecks if the model attribute matches the supplied regular expression. The regex query can be supplied without the `$regex` keyword\n\n```js\n_.query( MyCollection, { content: {$regex: /coffeescript/gi } });\n// Checks for a regex match in the content attribute\n_.query( MyCollection, { content: /coffeescript/gi });\n// Same as above\n```\n\n### $cb\nA callback function can be supplied as a test. The callback will receive the attribute and should return either true or false.\n`this` will be set to the current model, this can help with tests against computed properties\n\n```js\n_.query( MyCollection, { title: {$cb: function(attr){ return attr.charAt(0) === \"c\";}} });\n// Returns all models that have a title attribute that starts with \"c\"\n\n_.query( MyCollection, { computed_test: {$cb: function(){ return this.computed_property() > 10;}} });\n// Returns all models where the computed_property method returns a value greater than 10.\n```\n\nFor callbacks that use `this` rather than the model attribute, the key name supplied is arbitrary and has no\neffect on the results. If the only test you were performing was like the above test it would make more sense\nto simply use `MyCollection.filter`. However if you are performing other tests or are using the paging / sorting /\ncaching options of backbone query, then this functionality is useful.\n\n### $elemMatch\nThis operator allows you to perform queries in nested arrays similar to [MongoDB](http://www.mongodb.org/display/DOCS/Advanced+Queries#AdvancedQueries-%24elemMatch)\nFor example you may have a collection of models in with this kind of data stucture:\n\n```js\nvar Posts = new QueryCollection([\n    {title: \"Home\", comments:[\n      {text:\"I like this post\"},\n      {text:\"I love this post\"},\n      {text:\"I hate this post\"}\n    ]},\n    {title: \"About\", comments:[\n      {text:\"I like this page\"},\n      {text:\"I love this page\"},\n      {text:\"I really like this page\"}\n    ]}\n]);\n```\nTo search for posts which have the text \"really\" in any of the comments you could search like this:\n\n```js\nPosts.query({\n  comments: {\n    $elemMatch: {\n      text: /really/i\n    }\n  }\n});\n```\n\nAll of the operators above can be performed on `$elemMatch` queries, e.g. `$all`, `$size` or `$lt`.\n`$elemMatch` queries also accept compound operators, for example this query searches for all posts that\nhave at least one comment without the word \"really\" and with the word \"totally\".\n```js\nPosts.query({\n  comments: {\n    $elemMatch: {\n      $not: {\n        text: /really/i\n      },\n      $and: [{\n        text: /totally/i\n      }]\n    }\n  }\n});\n```\n\n\n### $computed\nThis operator allows you to perform queries on computed properties. For example you may want to perform a query\nfor a persons full name, even though the first and last name are stored separately in your db / model.\nFor example\n\n```js\ntestModel = Backbone.Model.extend({\n  full_name: function() {\n    return (this.get('first_name')) + \" \" + (this.get('last_name'));\n  }\n});\n\na = new testModel({\n  first_name: \"Dave\",\n  last_name: \"Tonge\"\n});\n\nb = new testModel({\n  first_name: \"John\",\n  last_name: \"Smith\"\n});\n\nMyCollection = new QueryCollection([a, b]);\n\n_.query( MyCollection, {\n  full_name: { $computed: \"Dave Tonge\" }\n});\n// Returns the model with the computed `full_name` equal to Dave Tonge\n\n_.query( MyCollection, {\n  full_name: { $computed: { $likeI: \"john smi\" } }\n});\n// Any of the previous operators can be used (including elemMatch is required)\n```\n\n\nCombined Queries\n================\n\nMultiple queries can be combined together. By default all supplied queries use the `$and` operator. However it is possible\nto specify either `$or`, `$nor`, `$not` to implement alternate logic.\n\n### $and\n\n```js\n_.query( MyCollection, { $and: [{ title: {$like: \"News\"} }, { likes: {$gt: 10}} ]});\n// Returns all models that contain \"News\" in the title and have more than 10 likes.\n_.query( MyCollection, { title: {$like: \"News\"}, likes: {$gt: 10} });\n// Same as above as $and is assumed if not supplied\n```\n\n### $or\n\n```js\n_.query( MyCollection, { $or: [{ title: {$like: \"News\"}}, { likes: {$gt: 10}}]});\n// Returns all models that contain \"News\" in the title OR have more than 10 likes.\n```\n\n### $nor\nThe opposite of `$or`\n\n```js\n_.query( MyCollection, { $nor: [{ title: {$like: \"News\"}}, { likes: {$gt: 10}}]});\n// Returns all models that don't contain \"News\" in the title NOR have more than 10 likes.\n```\n\n### $not\nThe opposite of `$and`\n\n```js\n_.query( MyCollection, { $not: { title: {$like: \"News\"}, likes: {$gt: 10}}});\n// Returns all models that don't contain \"News\" in the title AND DON'T have more than 10 likes.\n```\n\nIf you need to perform multiple queries on the same key, then you can supply the query as an array:\n```js\n_.query( MyCollection, {\n    $or:[\n        {title:\"News\"},\n        {title:\"About\"}\n    ]\n});\n// Returns all models with the title \"News\" or \"About\".\n```\n\n\nCompound Queries\n================\n\nIt is possible to use multiple combined queries, for example searching for models that have a specific title attribute,\nand either a category of \"abc\" or a tag of \"xyz\"\n\n```js\n_.query( MyCollection, {\n    $and: [{ title: {$like: \"News\"}]},\n    $or: [{ likes: {$gt: 10}}, { color:{$contains:\"red\"}]}\n});\n//Returns models that have \"News\" in their title and\n//either have more than 10 likes or contain the color red.\n```\n\n\nChainable API\n=============\n\nRather than supplying a single query object, you can build up the query bit by bit:\n\n```javascript\n _.query.build( MyCollection )\n  .and(\"published\", true)\n  .or(\"likes\", {$gt:10})\n  .or(\"tags\":[\"javascript\", \"coffeescript\"])\n  .run()\n```\n\nInstead of calling `_.query`, we call `_.query.build`. This returns a query object that we can build before running.\n`_.query.build` can take the collection that you want to query, or alternatively you can pass the collection in when\nrunning the query. Therefore these 2 both give the same results:\n\n```javascript\n results = _.query.build( MyCollection ).and(\"published\", true).run()\n results = _.query.build().and(\"published\", true).run( MyCollection )\n```\n\nTo build the query you can call `.and`, `.or`, `.nor` and `.not`.\nThese methods can accept either a query object, or a query key and a query value.  For example the following two examples\nare the same.\n\n```javascript\n results = _.query.build( MyCollection ).and({\"published\":true}).run()\n results = _.query.build( MyCollection ).and(\"published\", true).run()\n```\n\nTo run the query you can call either `.run`, `.all`, `.find`, or `.all`.\nThese methods are all aliases too each other and will run the query returning an array of results.\n\nTo retrieve just the first results you can use `.first`. For example:\n\n```javascript\n firstResult = _.query.build( MyCollection ).and({\"published\":true}).first()\n```\n\nIf you wish to perform further data manipulation using underscore, you can call the `.chain` method.\nThis will run the query and return the results as a wrapped underscore object, whcih you can then use methods like\n`.sortBy`, `.groupBy`, `.map`, etc.\n\n```javascript\ntitles = _.query.build( MyCollection )\n  .and(\"published\", true)\n  .or(\"likes\", {$gt:10})\n  .or(\"tags\":[\"javascript\", \"coffeescript\"])\n  .chain()\n  .sortBy(function(item) { return item.likes; })\n  .pluck(\"title\")\n  .value();\n```\n\nIndexing\n========\n\n\nMore documentation coming...\nEssentially you can add indexes when using the chainable syntax.\nYou can then perform queries as usual, but the results, should be faster on larger sets\nI suggest that you benchmark your code to test this out.\nThe index method takes either a single key, or a key and a function.\n\n\n```coffeescript\n\n    query = _.query(array)\n      .index(\"title\")\n\n    # could have been .index(\"title\", (obj) -> obj.title)\n\n    result = query.and(\"title\", \"Home\").run()\n```\n\n\n\nContributors\n===========\n\nDave Tonge - [davidgtonge](https://github.com/davidgtonge)\nBenjamin Caldwell - [benjamincaldwell](https://github.com/benjamincaldwell)\nRob W - [Rob W](https://github.com/Rob--W)\nCezary Wojtkowski - [cezary](https://github.com/cezary)\nGraeme Yeates - [megawac](https://github.com/megawac)\n","maintainers":[{"email":"megawac@gmail.com","name":"megawac"},{"email":"dave.tonge@moneyhub.co.uk","name":"davidgtonge"}],"time":{"modified":"2022-06-28T04:06:30.118Z","created":"2013-03-10T23:54:54.027Z","0.1.1":"2013-03-10T23:54:57.747Z","0.1.3":"2013-04-16T20:37:35.671Z","0.1.4":"2013-04-17T19:22:34.428Z","0.2.0":"2013-04-17T19:26:25.631Z","0.3.0":"2013-06-10T20:57:01.413Z","0.4.0":"2013-11-03T22:42:41.933Z","1.0.0":"2015-01-15T06:47:00.986Z","1.0.1":"2015-01-15T06:48:49.487Z","1.2.0":"2015-01-20T09:51:21.612Z","1.2.1":"2015-01-20T09:51:58.016Z","1.3.0":"2015-01-22T21:15:05.946Z","2.0.0":"2016-04-12T20:56:19.830Z","2.1.0":"2016-04-25T16:25:24.747Z","3.0.0":"2016-05-16T21:39:19.461Z","2.1.1":"2016-05-16T21:42:43.054Z","3.0.1":"2016-05-16T21:43:51.716Z","3.1.0":"2016-05-17T18:59:38.565Z","3.2.1":"2016-05-18T17:02:15.514Z","3.3.0":"2016-05-20T17:40:46.876Z","3.3.1":"2016-08-02T17:18:26.836Z","3.3.2":"2016-09-12T20:00:07.023Z"},"author":{"name":"Dave Tonge","email":"dave.tonge@momentumft.co.uk","url":"https://github.com/davidgtonge"},"repository":{"type":"git","url":"git+https://github.com/davidgtonge/underscore-query.git"},"homepage":"https://github.com/davidgtonge/underscore-query#readme","bugs":{"url":"https://github.com/davidgtonge/underscore-query/issues"},"readmeFilename":"README.md","users":{"lis186":true,"samobo":true}}