The Dynamically Populating Label Parameters documentation describes how you can:
Output and update labels using the format() expression function
e.g.:
{!format($Label.mySection.myLabel, v.attribute1, v.attribute2)}
But I need to build some error strings in a controller and in a helper not directly in the component markup.
I see that in the Using Custom Labels documentation a label value can be obtained in JavaScript via:
$A.get("$Label.namespace.labelName")
But is there a way to get hold of the format
function? (Simply calling it gives me "format is not defined" in both controller and helper.)