Module format

Source

Functions§

as_data_size
Display units dynamically formatted based on the size of the value.
as_gb
Display GB or GiB if short is false, otherwise if short is true and the value is greater than 1TB or 1TiB, display units using as_data_size().
as_kb
Display KB or KiB if short is false, otherwise if short is true and the value is greater than 1MB or 1MiB, display units using as_data_size().
as_mb
Display MB or MiB if short is false, otherwise if short is true and the value is greater than 1GB or 1GiB, display units using as_data_size().
format_as_float
Format supplied value as a float with 2 decimal places.