code: function isFiltered(doc, filter, db) {
    try {
      return !!(filter && !filter(doc));
    } catch (e) {
      db.emit('error', e);
      return true;
    }
  }
docs: return true if filtered, false otherwise limit the try/catch to its own function to avoid deoptimization