code: function queryFilter(where) {
    if (where.$or) {
      return object =>
        _.reduce(where.$or, (result, subclause) => result ||
          queryFilter(subclause)(object), false);
    }
  
    // Go through each key in where clause
    return object => _.reduce(where, (result, whereParams, key) => {
      const match = evaluateObject(object, whereParams, key);
      return result && match;
    }, true);
  }
docs: Returns a function that filters query matches on a where clause