lib/api-sync.js
function removeUpdatesInRequest(updatesInDb, updatesInRequest) {
  var updatesNotInRequest = _.filter(updatesInDb, function(dbUpdate) {
    var foundInRequest = _.findWhere(updatesInRequest, {hash: dbUpdate.hash});
    return !foundInRequest;
  });
  return updatesNotInRequest;
}
function removeUpdatesInRequest(updatesInDb, updatesInRequest) {
  var updatesNotInRequest = _.filter(updatesInDb, function(dbUpdate) {
    var foundInRequest = _.findWhere(updatesInRequest, {hash: dbUpdate.hash});
    return !foundInRequest;
  });
  return updatesNotInRequest;
}
function removeUpdatesInRequest ( updatesInDb , updatesInRequest ) { var updatesNotInRequest = _ . filter ( updatesInDb , function ( dbUpdate ) { var foundInRequest = _ . findWhere ( updatesInRequest , { hash : dbUpdate . hash } ) ; return ! foundInRequest ; } ) ; return updatesNotInRequest ; }
Remove all the records in `updatesInRequest` from `updatesInDb` if they exist
@param {Array} updatesInDb
@param {Array} updatesInRequest
@returns
Remove all the records in updatesInRequest from updatesInDb if they exist