From 45e8331e261244628b134a18e3d0fbe0ebb3a7dc Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 18 Mar 2017 20:05:11 +0900 Subject: :sushi: Closes #12, #227 and #58 --- src/web/app/common/scripts/bytes-to-size.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/web/app/common/scripts/bytes-to-size.js') diff --git a/src/web/app/common/scripts/bytes-to-size.js b/src/web/app/common/scripts/bytes-to-size.js index 717f9ad507..e143387141 100644 --- a/src/web/app/common/scripts/bytes-to-size.js +++ b/src/web/app/common/scripts/bytes-to-size.js @@ -1,6 +1,6 @@ -module.exports = function(bytes) { +export default bytes => { var sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB']; if (bytes == 0) return '0Byte'; var i = parseInt(Math.floor(Math.log(bytes) / Math.log(1024))); return Math.round(bytes / Math.pow(1024, i), 2) + sizes[i]; -} +}; -- cgit v1.3.1-freya