Skip to content
This repository was archived by the owner on Feb 23, 2023. It is now read-only.

Commit 2291842

Browse files
committed
fix: kilo prefix should be lower case #70
1 parent 130e7d2 commit 2291842

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/math/bytes.pipe.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Pipe, PipeTransform } from '@angular/core';
22
import { isNumberFinite, isPositive, isInteger, toDecimal } from '../utils/utils';
33

4-
export type ByteUnit = 'B' | 'KB' | 'MB' | 'GB' | 'TB';
4+
export type ByteUnit = 'B' | 'kB' | 'MB' | 'GB' | 'TB';
55

66

77
@Pipe({
@@ -11,8 +11,8 @@ export class BytesPipe implements PipeTransform {
1111

1212
static formats: { [key: string]: { max: number, prev?: ByteUnit } } = {
1313
'B': {max: 1024},
14-
'KB': {max: Math.pow(1024, 2), prev: 'B'},
15-
'MB': {max: Math.pow(1024, 3), prev: 'KB'},
14+
'kB': {max: Math.pow(1024, 2), prev: 'B'},
15+
'MB': {max: Math.pow(1024, 3), prev: 'kB'},
1616
'GB': {max: Math.pow(1024, 4), prev: 'MB'},
1717
'TB': {max: Number.MAX_SAFE_INTEGER, prev: 'GB'}
1818
};

0 commit comments

Comments
 (0)