UNPKG

@wscsports/blaze-rtn-sdk

Version:
29 lines (28 loc) 909 B
export class BlazeWidgetLabel { constructor(value) { this.value = value; } static singleLabel(label) { return new BlazeWidgetLabel(label); } static mustInclude(...labels) { const labelStrings = labels.map(v => v instanceof BlazeWidgetLabel ? v.toString() : v); return new BlazeWidgetLabel(`[and, ${labelStrings.join(', ')}]`); } static atLeastOneOf(...labels) { const labelStrings = labels.map(v => v instanceof BlazeWidgetLabel ? v.toString() : v); return new BlazeWidgetLabel(`[or, ${labelStrings.join(', ')}]`); } mustInclude(...labels) { return BlazeWidgetLabel.mustInclude(this, ...labels); } atLeastOneOf(...labels) { return BlazeWidgetLabel.atLeastOneOf(this, ...labels); } toString() { return this.value; } } // Example usage: const labelInstance = BlazeWidgetLabel.singleLabel('example'); //# sourceMappingURL=blaze-widget-label.js.map