definma-ui/src/app/object.pipe.ts
2020-07-13 10:52:10 +02:00

13 lines
259 B
TypeScript

import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
name: 'object'
})
export class ObjectPipe implements PipeTransform {
transform(value: object): string {
return value ? Object.entries(value).map(e => e.join(': ')).join(', ') : '';
}
}