import { Pipe , PipeTransform } from '@angular/core' ; @ Pipe ( { name : 'pending' } ) export class PendingPipe implements PipeTransform { param product return transform ( product ) { if ( ! product || ! product . properties ) { return null ; } let pending = false ; try { pending = product . properties [ 'landslide-alert' ] . toLowerCase ( ) !== 'pending' && product . properties [ 'liquefaction-alert' ] . toLowerCase ( ) !== 'pending' ; } catch ( e ) { pending = false ; } return pending ; } }