Class: ValueFormatter
Short human-readable rendering, shared by the bus inspector, logs and the CLI:
42, true, "eco" (strings are quoted), 60% 0.2s, 2700K 80% 2s, t5[left-upper+middle].
Constructors
Constructor
new ValueFormatter():
ValueFormatter
Returns
ValueFormatter
Methods
format()
format(
value,options?):string
Lossy by design (numbers round to 3 decimals): for display only, never parse the result. undefined gives an empty string.
Parameters
value
Value | undefined
options?
decimals?
number
a number value is shown with exactly this many decimals (a signal's display setting)
Returns
string