The numeric value in bytes to format.
Configuration object.
Optional
decimalSeparator?: stringDefault '.'
. Character to use as the decimal separator.
Optional
thousandSeparator?: stringDefault ','
. Character to use as the thousand separator.
A string representation of the size with the appropriate unit.
Converts a numeric value to a human-readable string representing a size in bytes. The value is divided by 1024 iteratively until it fits into a suitable unit (K, M, G, etc.).