code: function simpleTypeFilter(newDoc, oldDoc, candidateDocType) {
      if (oldDoc) {
        if (newDoc._deleted) {
          return oldDoc.type === candidateDocType;
        } else {
          return newDoc.type === oldDoc.type && oldDoc.type === candidateDocType;
        }
      } else {
        return newDoc.type === candidateDocType;
      }
    }
docs: A type filter that matches on the document's type property