]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/shared-main/angular/number-formatter.pipe.ts
Fix lint
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / shared-main / angular / number-formatter.pipe.ts
index 8badb1573d3f37f55f8c3813de7a7478f84321d0..00cfbc692b441dc88ea22d8d309ec4bf06693818 100644 (file)
@@ -13,15 +13,16 @@ export class NumberFormatterPipe implements PipeTransform {
   static getDecimalForNumber (x: number, n = 1) {
     const v = x.toString().split('.')
     const f = v[1] || ''
-    if (f.length > n) return +f.substr(0, n)
+    if (f.length > n) return +f.substring(0, n)
     return +f
   }
 
-  private dictionary: Array<{max: number, type: string}> = [
+  private dictionary: { max: number, type: string }[] = [
     { max: 1000, type: '' },
     { max: 1000000, type: 'K' },
     { max: 1000000000, type: 'M' }
   ]
+
   constructor (@Inject(LOCALE_ID) private localeId: string) {}
 
   transform (value: number) {