ampersand-filtered-subcollection.js
function (newFilters, oldFilters) {
        var self = this;

        if (!oldFilters) {
            oldFilters = this._filters;
        } else if (!isArray(oldFilters)) {
            oldFilters = [oldFilters];
        }

        if (!newFilters) {
            newFilters = [];
        } else if (!isArray(newFilters)) {
            newFilters = [newFilters];
        }

        oldFilters.forEach(function (filter) {
            self._removeFilter(filter);
        });

        newFilters.forEach(function (filter) {
            self._addFilter(filter);
        });

        this._runFilters();
    }
function (newFilters, oldFilters) {
        var self = this;

        if (!oldFilters) {
            oldFilters = this._filters;
        } else if (!isArray(oldFilters)) {
            oldFilters = [oldFilters];
        }

        if (!newFilters) {
            newFilters = [];
        } else if (!isArray(newFilters)) {
            newFilters = [newFilters];
        }

        oldFilters.forEach(function (filter) {
            self._removeFilter(filter);
        });

        newFilters.forEach(function (filter) {
            self._addFilter(filter);
        });

        this._runFilters();
    }
function ( newFilters , oldFilters ) { var self = this ; if ( ! oldFilters ) { oldFilters = this . _filters ; } else if ( ! isArray ( oldFilters ) ) { oldFilters = [ oldFilters ] ; } if ( ! newFilters ) { newFilters = [ ] ; } else if ( ! isArray ( newFilters ) ) { newFilters = [ newFilters ] ; } oldFilters . forEach ( function ( filter ) { self . _removeFilter ( filter ) ; } ) ; newFilters . forEach ( function ( filter ) { self . _addFilter ( filter ) ; } ) ; this . _runFilters ( ) ; }
Swap out a set of old filters with a set of new filters
Swap out a set of old filters with a set of new filters