import { Pipe , PipeTransform } from '@angular/core' ; import { FileSizeUtil } from './file-size' ; @ Pipe ( { name : 'fileSize' } ) export class FileSizePipe implements PipeTransform { transform ( bytes = 0 , precision = 2 ) { return FileSizeUtil . transform ( bytes , precision ) ; } }