node package manager


compile mongo queries into javascript functions


Mongoc lets you compile mongodb queries into Javascript functions that returns true if the query fits the input

It's available through npm:

npm install mongoc

It's easy to use

var mongoc = require('mongoc');
var query = mongoc({
console.log(query({hello:world, time:14})) // prints true; 

You can use the query to filter an array

var query = mongoc({

For a complete reference of the query language see the mongo docs