function toggleFilter(key, value) {
        settings.state.filters[key] = settings.state.filters[key] || [];
        if (_.indexOf(settings.state.filters[key], value) == -1) {
            settings.state.filters[key].push(value);
        } else {
            settings.state.filters[key] = _.without(settings.state.filters[key], value);
            if (settings.state.filters[key].length == 0) {
                delete settings.state.filters[key];
            }
        }
        filter();
    }
/**
     * The given facetname and filtername are activated or deactivated
     * depending on what they were beforehand. This causes the items to
     * be filtered again and the UI is updated accordingly.
     */
The given facetname and filtername are activated or deactivated
depending on what they were beforehand. This causes the items to
be filtered again and the UI is updated accordingly.
The given facetname and filtername are activated or deactivated depending on what they were beforehand . This causes the items to be filtered again and the UI is updated accordingly .
function toggleFilter(key, value) {
        settings.state.filters[key] = settings.state.filters[key] || [];
        if (_.indexOf(settings.state.filters[key], value) == -1) {
            settings.state.filters[key].push(value);
        } else {
            settings.state.filters[key] = _.without(settings.state.filters[key], value);
            if (settings.state.filters[key].length == 0) {
                delete settings.state.filters[key];
            }
        }
        filter();
    }
function toggleFilter ( key , value ) { settings . state . filters [ key ] = settings . state . filters [ key ] || [ ] ; if ( _ . indexOf ( settings . state . filters [ key ] , value ) == - 1 ) { settings . state . filters [ key ] . push ( value ) ; } else { settings . state . filters [ key ] = _ . without ( settings . state . filters [ key ] , value ) ; if ( settings . state . filters [ key ] . length == 0 ) { delete settings . state . filters [ key ] ; } } filter ( ) ; }
The given facetname and filtername are activated or deactivated
 depending on what they were beforehand.
The given facetname and filtername are activated or deactivated depending on what they were beforehand .