angular-pipes
Version:
Angular pipes library
19 lines (18 loc) • 617 B
TypeScript
import { PipeTransform } from '@angular/core';
export declare type ByteUnit = 'B' | 'kB' | 'KB' | 'MB' | 'GB' | 'TB';
export declare class BytesPipe implements PipeTransform {
static formats: {
[key: string]: {
max: number;
prev?: ByteUnit;
};
};
transform(input: any, decimal?: number, from?: ByteUnit, to?: ByteUnit): any;
static formatResult(result: number, unit: string): string;
static calculateResult(format: {
max: number;
prev?: ByteUnit;
}, bytes: number): number;
}
export declare class NgBytesPipeModule {
}