code: function intersection(xArr, yArr, xFilter, yFilter, invert) {
          var i, j, n, filteredX, filteredY, out = invert ? [].concat(xArr) : [];
  
          for (i = 0, n = xArr.length; i < xArr.length; i++) {
              filteredX = xFilter ? xFilter(xArr[i]) : xArr[i];
  
              for (j = 0; j < yArr.length; j++) {
                  filteredY = yFilter ? yFilter(yArr[j]) : yArr[j];
  
                  if (angular.equals(filteredX, filteredY, xArr, yArr, i, j)) {
                      invert ? out.splice(i + out.length - n, 1) : out.push(yArr[j]);
                      break;
                  }
              }
          }
          return out;
      }
docs: lodash _.intersection + filter + invert