fn = function(bytes) {
  if (!(this instanceof fn)) return new fn(bytes);

  this.bytes = bytes;
  if (bytes == 0) {
    this.unit = 0;
  } else {
    this.unit = parseInt(Math.floor(Math.log(bytes) / Math.log(1024)));
  }

  return this;
}
Object representing human-readable version of a given number of bytes.

(Extracted logic from an old dashboard view)

@param bytes {Number}
@returns {Object}