prod/service-worker-28ddbc7ef7a575da0539a0f05f4bfdae.js
function matchesSelector(doc, selector) {
  /* istanbul ignore if */
  if (typeof selector !== 'object') {
    // match the CouchDB error message
    throw 'Selector error: expected a JSON object';
  }

  selector = massageSelector(selector);
  var row = {
    'doc': doc
  };

  var rowsMatched = filterInMemoryFields([row], { 'selector': selector }, Object.keys(selector));
  return rowsMatched && rowsMatched.length === 1;
}
function matchesSelector(doc, selector) {
  /* istanbul ignore if */
  if (typeof selector !== 'object') {
    // match the CouchDB error message
    throw 'Selector error: expected a JSON object';
  }

  selector = massageSelector(selector);
  var row = {
    'doc': doc
  };

  var rowsMatched = filterInMemoryFields([row], { 'selector': selector }, Object.keys(selector));
  return rowsMatched && rowsMatched.length === 1;
}
function matchesSelector ( doc , selector ) { /* istanbul ignore if */ if ( typeof selector !== 'object' ) { // match the CouchDB error message throw 'Selector error: expected a JSON object' ; } selector = massageSelector ( selector ) ; var row = { 'doc' : doc } ; var rowsMatched = filterInMemoryFields ( [ row ] , { 'selector' : selector } , Object . keys ( selector ) ) ; return rowsMatched && rowsMatched . length === 1 ; }
return true if the given doc matches the supplied selector
return true if the given doc matches the supplied selector