-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- Source: +
- + services/size.js, line 1 +
+
+
+
+
+
+
+
+
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: +
- + services/size.js, line 17 +
+
+
+
+
+
+
+
+
Returns:
+ + +A badge object that has three properties: label, message, and color
+-
+
- + Type + +
- + +object + + + +