code: function _getFilterIndex(filterSets, filter) {
          var index = -1;
  
          if (!filter || !filterSets.length) {
              return index;
          }
  
          return _.findIndex(filterSets, _.partial(_.isEqual, filter));
      }
docs: Find the index of a filter set in the list of saved filter sets.
  @param {Array.<{name: string, patterns: Array.<string>}>} filterSets
  @return {{name: string, patterns: Array.<string>}} filter