- Source:
Methods
(inner) renderSizeBadge(bytes, units, labelopt) → {object}
Creates a badge object that displays information about a size in bytes number. It should usually be used to output a size badge.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
bytes |
number | Raw number of bytes to be formatted |
||
units |
'metric' | 'iec' | Either 'metric' (multiples of 1000) or 'iec' (multiples of 1024). This should align with how the upstream displays sizes. |
||
label |
string |
<optional> |
'size' | Custom label |
- Source:
Returns:
A badge object that has three properties: label, message, and color
- Type
- object