import { Pipe , PipeTransform } from '@angular/core' ; @ Pipe ( { name : 'objectCount' } ) export class ObjectCountPipe implements PipeTransform { transform ( value , args ? ) { if ( value ) { return Object . keys ( value ) . length ; } else { return 0 ; } } }