aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-main/angular/number-formatter.pipe.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/shared/shared-main/angular/number-formatter.pipe.ts')
-rw-r--r--client/src/app/shared/shared-main/angular/number-formatter.pipe.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/client/src/app/shared/shared-main/angular/number-formatter.pipe.ts b/client/src/app/shared/shared-main/angular/number-formatter.pipe.ts
index 7c18b7f67..e0cb475fc 100644
--- a/client/src/app/shared/shared-main/angular/number-formatter.pipe.ts
+++ b/client/src/app/shared/shared-main/angular/number-formatter.pipe.ts
@@ -13,11 +13,11 @@ export class NumberFormatterPipe implements PipeTransform {
13 static getDecimalForNumber (x: number, n = 1) { 13 static getDecimalForNumber (x: number, n = 1) {
14 const v = x.toString().split('.') 14 const v = x.toString().split('.')
15 const f = v[1] || '' 15 const f = v[1] || ''
16 if (f.length > n) return +f.substr(0, n) 16 if (f.length > n) return +f.substring(0, n)
17 return +f 17 return +f
18 } 18 }
19 19
20 private dictionary: Array<{max: number, type: string}> = [ 20 private dictionary: Array<{ max: number, type: string }> = [
21 { max: 1000, type: '' }, 21 { max: 1000, type: '' },
22 { max: 1000000, type: 'K' }, 22 { max: 1000000, type: 'K' },
23 { max: 1000000000, type: 'M' } 23 { max: 1000000000, type: 'M' }