import { Pipe , PipeTransform } from '@angular/core' ; @ Pipe ( { name : 'keys' } ) export class KeysPipe implements PipeTransform { param value return { any } transform ( value ) { if ( ! value ) { return null ; } return Object . keys ( value ) ; } }