export function formatBytes()

in automation/size/utils.js [49:55]


export function formatBytes(bytes) {
  let l = 0, n = parseInt(bytes, 10) || 0;
  while(n >= 1024 && ++l){
    n = n/1024;
  }
  return(n.toFixed(n < 10 && l > 0 ? 1 : 0) + ' ' + UNITS[l]);
}