Function: formatBytes()
formatBytes(
bytes,locale?):string
Defined in: src/ui/elements/PcStats/index.ts:25
A size in bytes in the largest unit it has at least one of, to one decimal place (whole bytes), for a locale.
Parameters
bytes
number
locale?
string
Returns
string
Example
formatBytes(84_560, "en-GB"); // "84.6 kB"
formatBytes(512, "en-GB"); // "512 byte"