diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-02-20 07:56:39 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-02-20 07:56:39 +0900 |
| commit | bc17a0b2cb3e789d79e277ecd64a10ae1ac2e7a5 (patch) | |
| tree | 394de527e5adc8e2c543a3c1c3b59fee945dade4 /src/web/app/common | |
| parent | wip (diff) | |
| download | sharkey-bc17a0b2cb3e789d79e277ecd64a10ae1ac2e7a5.tar.gz sharkey-bc17a0b2cb3e789d79e277ecd64a10ae1ac2e7a5.tar.bz2 sharkey-bc17a0b2cb3e789d79e277ecd64a10ae1ac2e7a5.zip | |
wip
Diffstat (limited to 'src/web/app/common')
| -rw-r--r-- | src/web/app/common/scripts/bytes-to-size.ts | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/src/web/app/common/scripts/bytes-to-size.ts b/src/web/app/common/scripts/bytes-to-size.ts deleted file mode 100644 index 1d2b1e7ce3..0000000000 --- a/src/web/app/common/scripts/bytes-to-size.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default (bytes, digits = 0) => { - const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB']; - if (bytes == 0) return '0Byte'; - const i = Math.floor(Math.log(bytes) / Math.log(1024)); - return (bytes / Math.pow(1024, i)).toFixed(digits).replace(/\.0+$/, '') + sizes[i]; -}; |