Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
_proto.doesDocumentDataMatch = function doesDocumentDataMatch(docData) {
// if doc is deleted, it cannot match
if (docData._deleted) return false;
var selector = this.mquery._conditions;
docData = this.collection.schema.swapPrimaryToId(docData);
var inMemoryFields = Object.keys(selector);
var matches = rowFilter(docData, this.massageSelector, inMemoryFields);
return matches;
}
/**
doesDocumentDataMatch(docData: RxDocumentType | any): boolean {
// if doc is deleted, it cannot match
if (docData._deleted) return false;
const selector = this.mquery._conditions;
docData = this.collection.schema.swapPrimaryToId(docData);
const inMemoryFields = Object.keys(selector);
const matches = rowFilter(
docData,
this.massageSelector,
inMemoryFields
);
return matches;
}