import { Pipe } from "@angular/core";
var FilterPipe = (function () {
    function FilterPipe() {
    }
    FilterPipe.prototype.transform = function (value, args) {
        var filter = args[0];
        if (filter && Array.isArray(value)) {
            var filterKeys_1 = Object.keys(filter);
            return value.filter(function (item) {
                return filterKeys_1.reduce(function (memo, keyName) {
                    return memo && item[keyName] === filter[keyName];
                }, true);
            });
        }
        else {
            return value;
        }
    };
    FilterPipe.decorators = [
        { type: Pipe, args: [{
                    name: 'filter'
                },] },
    ];
    /** @nocollapse */
    FilterPipe.ctorParameters = function () { return []; };
    return FilterPipe;
}());
export { FilterPipe };
//# sourceMappingURL=filter.pipe.js.map