summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuuso Lapinlampi <wub@partyvan.eu>2015-09-27 17:34:27 +0200
committerJuuso Lapinlampi <wub@partyvan.eu>2015-09-27 17:35:58 +0200
commit64bc5c47da06fbb6b638f2c95e44f081089fc7c3 (patch)
tree1cc5a1472202ae10934357af43ccedeee2f665aa
parentf5ebff0cdd9ef99d536ef4a9f7c45706152153fa (diff)
Fix JavaScript units[] array coding style
Reduces confusion and improves readability, despite not having yet agreed on which JavaScript style guide to use.
-rw-r--r--js/cheesesteak.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/js/cheesesteak.js b/js/cheesesteak.js
index 821b9cd..a3cf991 100644
--- a/js/cheesesteak.js
+++ b/js/cheesesteak.js
@@ -66,8 +66,8 @@
/* Utility to convert bytes into human units */
var humanSize = {
get: function humanSize() {
- var units = ["B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB",
- "YiB"
+ var units = [
+ "B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB"
];
var e = Math.floor(Math.log(this.size) / Math.log(1024));
return (this.size / Math.pow(1024, e)).toFixed(2) + " " + units[e];