summaryrefslogtreecommitdiffstats
path: root/core/src/OC/util.js
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/OC/util.js')
-rw-r--r--core/src/OC/util.js22
1 files changed, 11 insertions, 11 deletions
diff --git a/core/src/OC/util.js b/core/src/OC/util.js
index aba47065e54..5908d9f6e1f 100644
--- a/core/src/OC/util.js
+++ b/core/src/OC/util.js
@@ -81,17 +81,17 @@ export default {
let bytes = null
const bytesArray = {
- 'b': 1,
- 'k': 1024,
- 'kb': 1024,
- 'mb': 1024 * 1024,
- 'm': 1024 * 1024,
- 'gb': 1024 * 1024 * 1024,
- 'g': 1024 * 1024 * 1024,
- 'tb': 1024 * 1024 * 1024 * 1024,
- 't': 1024 * 1024 * 1024 * 1024,
- 'pb': 1024 * 1024 * 1024 * 1024 * 1024,
- 'p': 1024 * 1024 * 1024 * 1024 * 1024,
+ b: 1,
+ k: 1024,
+ kb: 1024,
+ mb: 1024 * 1024,
+ m: 1024 * 1024,
+ gb: 1024 * 1024 * 1024,
+ g: 1024 * 1024 * 1024,
+ tb: 1024 * 1024 * 1024 * 1024,
+ t: 1024 * 1024 * 1024 * 1024,
+ pb: 1024 * 1024 * 1024 * 1024 * 1024,
+ p: 1024 * 1024 * 1024 * 1024 * 1024,
}
const matches = s.match(/^[\s+]?([0-9]*)(\.([0-9]+))?( +)?([kmgtp]?b?)$/i)