add pretty-printers for byte-counts

This commit is contained in:
ansuz
2017-04-18 15:44:15 +02:00
parent 2a25afae5f
commit 2b8579e8b7
3 changed files with 11 additions and 5 deletions

View File

@@ -81,5 +81,13 @@ define([], function () {
.replace(/_+/g, '_');
};
var bytesToMegabytes = Util.bytesToMegabytes = function (bytes) {
return Math.floor((bytes / (1024 * 1024) * 100)) / 100;
};
var bytesToKilobytes = Util.bytesToKilobytes = function (bytes) {
return Math.floor(bytes / 1024 * 100) / 100;
};
return Util;
});