import { Pipe , PipeTransform } from '@angular/core' ; @ Pipe ( { name : 'pickByProp' , pure : true } ) export class PickByPropPipe implements PipeTransform { transform < T > ( items , prop , value ) { if ( ! items ) { return items ; } return items . filter ( item => item [ prop ] === value ) ; } }