From bc17a0b2cb3e789d79e277ecd64a10ae1ac2e7a5 Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 20 Feb 2018 07:56:39 +0900 Subject: wip --- src/web/app/common/scripts/bytes-to-size.ts | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 src/web/app/common/scripts/bytes-to-size.ts (limited to 'src/web/app/common') 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]; -}; -- cgit v1.2.3-freya