Expand description
Human-readable value formatting helpers.
Functionsยง
- as_
data_ size - Display units dynamically formatted based on the size of the value.
- as_gb
- Display GB or GiB if
shortis false, otherwise ifshortis true and the value is greater than 1TB or 1TiB, display units usingas_data_size(). - as_kb
- Display KB or KiB if
shortis false, otherwise ifshortis true and the value is greater than 1MB or 1MiB, display units usingas_data_size(). - as_mb
- Display MB or MiB if
shortis false, otherwise ifshortis true and the value is greater than 1GB or 1GiB, display units usingas_data_size(). - format_
as_ float - Format supplied value as a float with 2 decimal places.