import { Pipe , PipeTransform } from '@angular/core' ; @ Pipe ( { name : 'aggregateBlockPipe' , } ) export class AggregateBlockPipe implements PipeTransform { transform ( input ) { if ( ! input ) { return '' ; } return input . replace ( /\B(?=(\d{3})+(?!\d))/g , ',' ) ; } }