import { Pipe , PipeTransform } from '@angular/core' ; @ Pipe ( { name : 'hasKeywords' } ) export class HasKeywordsPipe implements PipeTransform { transform ( value , args ? ) { if ( args === "showAllValues" ) { return value . filter ( cat => cat . jobKeywords === 0 ) ; } return value . filter ( cat => cat . jobKeywords > 0 ) ; } }