const r=(t,e=0)=>{if(t==null)return"?";const n=["B","KB","MB","GB","TB"];if(t===0)return"0";const o=t<0;o&&(t=-t);const s=Math.floor(Math.log(t)/Math.log(1024));return(o?"-":"")+(t/Math.pow(1024,s)).toFixed(e).replace(/\.0+$/,"")+n[s]};export{r as b};
