UNPKG

fabric8-analytics-dependency-editor-jyas

Version:
31 lines 1.03 kB
import { Pipe } from '@angular/core'; var FilterPipe = /** @class */ (function () { function FilterPipe() { } FilterPipe.prototype.transform = function (value, input) { if (input && value) { if (input.indexOf('$$') !== -1) { var cat_1 = input.split('$$')[0]; if (cat_1 !== 'All') { return value.filter(function (i) { return i.category.indexOf(cat_1) !== -1; }); } return value; } input = input.toLowerCase(); return value.filter(function (el) { return el.name.toLowerCase().indexOf(input) > -1; }); } return value; }; FilterPipe.decorators = [ { type: Pipe, args: [{ name: 'FilterPipe' },] }, ]; /** @nocollapse */ FilterPipe.ctorParameters = function () { return []; }; return FilterPipe; }()); export { FilterPipe }; //# sourceMappingURL=add-dependency.pipe.js.map