summaryrefslogtreecommitdiff
path: root/src/web/app/common/scripts
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-02-20 07:56:39 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-02-20 07:56:39 +0900
commitbc17a0b2cb3e789d79e277ecd64a10ae1ac2e7a5 (patch)
tree394de527e5adc8e2c543a3c1c3b59fee945dade4 /src/web/app/common/scripts
parentwip (diff)
downloadsharkey-bc17a0b2cb3e789d79e277ecd64a10ae1ac2e7a5.tar.gz
sharkey-bc17a0b2cb3e789d79e277ecd64a10ae1ac2e7a5.tar.bz2
sharkey-bc17a0b2cb3e789d79e277ecd64a10ae1ac2e7a5.zip
wip
Diffstat (limited to 'src/web/app/common/scripts')
-rw-r--r--src/web/app/common/scripts/bytes-to-size.ts6
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];
-};