code: function good(value, test){
  
       // Comparing two primitive types
       if (typeof test !== 'object') {
         return (test == value);
       }
  
       // Loop each possible condition
       for (let name in conditions) {
  
         // If the filter has this test and it's not passed
         if (name in conditions && name in test &&
             !conditions[name](value, test[name])) {
           return false;
         }
       }
  
       // All the tests for the complex filter have passed
       return true;
     }
docs: From http://docs.mongodb.org/manual/reference/operator/query/