Update permissions checking code
This commit is contained in:
parent
2e9d327dfc
commit
8bc81c8c4b
7 changed files with 79 additions and 43 deletions
|
@ -5,7 +5,7 @@ export function bytesToHuman (bytes: number): string {
|
|||
|
||||
const i = Math.floor(Math.log(bytes) / Math.log(1000));
|
||||
// @ts-ignore
|
||||
return `${(bytes / Math.pow(1000, i)).toFixed(2) * 1} ${['Bytes', 'kB', 'MB', 'GB', 'TB'][i]}`;
|
||||
return `${(bytes / Math.pow(1000, i)).toFixed(2) * 1} ${[ 'Bytes', 'kB', 'MB', 'GB', 'TB' ][i]}`;
|
||||
}
|
||||
|
||||
export const bytesToMegabytes = (bytes: number) => Math.floor(bytes / 1000 / 1000);
|
||||
|
|
Reference in a new issue