diff options
author | dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> | 2019-11-13 12:05:10 +0000 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2019-12-19 11:55:33 +0100 |
commit | ec01e0a790448fff38364f629a4de4edb5d465bf (patch) | |
tree | 8fb5369e3d6f9f805025802e12feaa4dfaef1e03 /core/src/Util | |
parent | 5d9fd7ba0cced84f1d07627b0860ac5490de164d (diff) | |
download | nextcloud-server-ec01e0a790448fff38364f629a4de4edb5d465bf.tar.gz nextcloud-server-ec01e0a790448fff38364f629a4de4edb5d465bf.zip |
Bump eslint-config-nextcloud from 0.0.6 to 0.1.0
Bumps [eslint-config-nextcloud](https://github.com/nextcloud/eslint-config-nextcloud) from 0.0.6 to 0.1.0.
- [Release notes](https://github.com/nextcloud/eslint-config-nextcloud/releases)
- [Commits](https://github.com/nextcloud/eslint-config-nextcloud/compare/v0.0.6...v0.1.0)
Co-authored-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'core/src/Util')
-rw-r--r-- | core/src/Util/human-file-size.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/src/Util/human-file-size.js b/core/src/Util/human-file-size.js index 586ef0e9267..7f9eb7ab61d 100644 --- a/core/src/Util/human-file-size.js +++ b/core/src/Util/human-file-size.js @@ -26,13 +26,13 @@ * @returns {string} */ export default function humanFileSize(size, skipSmallSizes) { - var humanList = ['B', 'KB', 'MB', 'GB', 'TB'] + const humanList = ['B', 'KB', 'MB', 'GB', 'TB'] // Calculate Log with base 1024: size = 1024 ** order - var order = size > 0 ? Math.floor(Math.log(size) / Math.log(1024)) : 0 + let order = size > 0 ? Math.floor(Math.log(size) / Math.log(1024)) : 0 // Stay in range of the byte sizes that are defined order = Math.min(humanList.length - 1, order) - var readableFormat = humanList[order] - var relativeSize = (size / Math.pow(1024, order)).toFixed(1) + const readableFormat = humanList[order] + let relativeSize = (size / Math.pow(1024, order)).toFixed(1) if (skipSmallSizes === true && order === 0) { if (relativeSize !== '0.0') { return '< 1 KB' |