lib/push-to-s3.js
function bytesToSize (bytes) {
  const sizes = ['bytes', 'kb', 'mb', 'gb', 'tb']
  if (bytes === 0) return '0 byte'
  const i = parseInt(Math.floor(Math.log(bytes) / Math.log(BYTES)))
  return (bytes / Math.pow(BYTES, i)).toFixed(DISPLAY_DECIMALS) + sizes[i]
}
function bytesToSize (bytes) {
  const sizes = ['bytes', 'kb', 'mb', 'gb', 'tb']
  if (bytes === 0) return '0 byte'
  const i = parseInt(Math.floor(Math.log(bytes) / Math.log(BYTES)))
  return (bytes / Math.pow(BYTES, i)).toFixed(DISPLAY_DECIMALS) + sizes[i]
}
function bytesToSize ( bytes ) { const sizes = [ 'bytes' , 'kb' , 'mb' , 'gb' , 'tb' ] if ( bytes === 0 ) return '0 byte' const i = parseInt ( Math . floor ( Math . log ( bytes ) / Math . log ( BYTES ) ) ) return ( bytes / Math . pow ( BYTES , i ) ) . toFixed ( DISPLAY_DECIMALS ) + sizes [ i ] }
Pretty print the size of the number of bytes.
Pretty print the size of the number of bytes .