Skip to content
Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
17 lines (13 sloc) 385 Bytes
import { Pipe, PipeTransform } from '@angular/core';
import { createRound, isString } from '../utils/utils';
@Pipe({
name: 'round'
})
export class RoundPipe implements PipeTransform {
transform (value: any, precision: any = 0): any {
if (isString(precision)) {
precision = parseInt(precision);
}
return createRound('round')(value, precision);
}
}
You can’t perform that action at this time.