mongoc
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 = ;var query =;console // prints true;
You can use the query to filter an array
var query =;console;
For a complete reference of the query language see the mongo docs