src/search/FileFilters.js
function _getFilterIndex(filterSets, filter) {
        var index = -1;

        if (!filter || !filterSets.length) {
            return index;
        }

        return _.findIndex(filterSets, _.partial(_.isEqual, filter));
    }
function _getFilterIndex(filterSets, filter) {
        var index = -1;

        if (!filter || !filterSets.length) {
            return index;
        }

        return _.findIndex(filterSets, _.partial(_.isEqual, filter));
    }
function _getFilterIndex ( filterSets , filter ) { var index = - 1 ; if ( ! filter || ! filterSets . length ) { return index ; } return _ . findIndex ( filterSets , _ . partial ( _ . isEqual , filter ) ) ; }
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
Find the index of a filter set in the list of saved filter sets .