Function: displayLabel()¶
displayLabel(
labelled):string
The text to show for a labelled INDI thing: its label, or its name.
Takes the label only when it carries something, so an element or vector whose label is absent, empty, or nothing but whitespace falls back to the wire name rather than rendering as a blank control. Pass the whole element or vector rather than the two fields, so a caller cannot pair one thing's label with another's name.
Parameters¶
labelled¶
Anything carrying an INDI name and optional label.
label?¶
string | null
name¶
string
Returns¶
string
The label when it is non-empty, otherwise the name.