Class for labels.
The label for this class in JSON format.
const label = new Label({ language: 'en', value: 'Douglas Adams' }); Copy
const label = new Label({ language: 'en', value: 'Douglas Adams' });
The language of the label.
The value of the label.
Create a unique ID for the Label.
The ID.
This function checks if two Labels are equal.
The other Label.
True if the Labels are equal.
const label1 = new Label({ language: 'en', value: 'foo' }); const label2 = new Label({ language: 'en', value: 'bar' }); label1.equals(label2); // false Copy
const label1 = new Label({ language: 'en', value: 'foo' }); const label2 = new Label({ language: 'en', value: 'bar' }); label1.equals(label2); // false
The label as JSON.
const json = label.toJSON(); Copy
const json = label.toJSON();
Static
Create a label from a language and a value.
The label object.
const label = Label.fromString('en', 'Douglas Adams'); Copy
const label = Label.fromString('en', 'Douglas Adams');
Class for labels.