Value Functions
Functions that return a static value.
Err
Returns err
err()
False
Returns boolean false
false()
Format IEC Byte Size
Formats a number of bytes as a more human readable string, using IEC units, i.e. multiples of 1024.
formatIECByteSize(bytes)
formatIECByteSize(bytes, omitTrailingZeros)
formatIECByteSize(bytes, omitTrailingZeros, significantFigures)
bytes- The number of bytes.omitTrailingZeros- Whether to omit trailing zeros, defaultfalse.significantFigures- The number of significant digits required. If the number of integer digits is greater then that will be used instead, so that the integer part is always shown in full, e.g.1023BwheresignificantFiguresis3.
Examples
formatIECByteSize(1024)
> '1.0K'
formatIECByteSize(1024, true)
> '1K'
formatIECByteSize(9878424780)
> '9.2G'
Format Metric Byte Size
Formats a number of bytes as a more human readable string, using metric units, i.e. multiples of 1000.
formatMetricByteSize(bytes)
formatMetricByteSize(bytes, omitTrailingZeros)
formatMetricByteSize(bytes, omitTrailingZeros, significantFigures)
The arguments are the same as for Format IEC Byte Size.
Examples
formatMetricByteSize(1000)
> '1.0K'
formatMetricByteSize(1096)
> '1.1K'
Null
Returns null
null()
True
Returns boolean true
true()
Last modified August 14, 2026: fix build (307b3f0)