import path from "path" ; export function pathsToString ( set ) { return [ ... set ] . map ( ( filePath ) => path . relative ( "" , filePath ) ) . sort ( ) . join ( ", " ) ; } export function formatSize ( bytes ) { if ( bytes >= 524288 ) return `${ ( bytes / 1048576 ) . toFixed ( 2 ) }MiB` ; if ( bytes >= 512 ) return `${ ( bytes / 1024 ) . toFixed ( 2 ) }KiB` ; return `${ bytes }B` ; }