/ concept-collection / ephys_compression_tests
Sign in
concept-collection / ephys_compression_tests
11 lines · 320 BCodeBlameHistory
552a4baadd web-uiJeremy Magland 1export const formatNumber = (num: number, decimals = 2) => {
2 return new Intl.NumberFormat("en-US", {
3 minimumFractionDigits: decimals,
4 maximumFractionDigits: decimals,
5 }).format(num);
6};
8export const formatSize = (bytes: number) => {
9 const mb = bytes / (1024 * 1024);
10 return `${formatNumber(mb)} MB`;
11};
moveopenescclose