code: function(value, precision, base){
      var sizes =         ['Y','Z','E','P','T','G','M','k',''],
          fractionSizes = ['y','z','a','f','p','n','µ','m',''],
          total = sizes.length;
  
      base = base || 1000;
      precision = Math.pow(10, precision || 2);
  
      if (value === 0) return 0;
  
      if (value > 1) {
        while (total-- && (value >= base)) value /= base;
      }
      else {
        sizes = fractionSizes;
        total = sizes.length;
        while (total-- && (value < 1)) value *= base;
      }
  
      return (Math.round(value * precision) / precision) + sizes[total];
    }
docs: Utility function to convert file size values in bytes to kB, MB, ...
  @param value {Number} - The value to convert
  @param precision {Number} - The number of digits after the comma (default: 2)
  @param base {Number} - The base (default: 1000)