Skip to content

Function: formatNumber()

formatNumber(value, format?): string

Format a number per an INDI printf-style format string.

Mirrors the Python codec's format_number (including libindi-faithful field padding for %m, and that function's strip of the printf result, which is why a space-padded width never shows); trim the result for display when the %m alignment padding is not wanted.

Parameters

value

number

format?

string | null

Returns

string