UNPKG

@bitbybit-dev/base

Version:

Bit By Bit Developers Base CAD Library to Program Geometry

121 lines (120 loc) 3.16 kB
/* eslint-disable @typescript-eslint/no-namespace */ export var Text; (function (Text) { class TextDto { constructor(text) { /** * The text * @default Hello World */ this.text = "Hello World"; if (text !== undefined) { this.text = text; } } } Text.TextDto = TextDto; class TextSplitDto { constructor(text, separator) { /** * Text to split * @default a,b,c */ this.text = "a,b,c"; /** * Text to split by * @default , */ this.separator = ","; if (text !== undefined) { this.text = text; } if (separator !== undefined) { this.separator = separator; } } } Text.TextSplitDto = TextSplitDto; class TextReplaceDto { constructor(text, search, replaceWith) { /** * Text to replace * @default a-c */ this.text = "a-c"; /** * Text to search for * @default - */ this.search = "-"; /** * Text to replace found occurences * @default b */ this.replaceWith = "b"; if (text !== undefined) { this.text = text; } if (search !== undefined) { this.search = search; } if (replaceWith !== undefined) { this.replaceWith = replaceWith; } } } Text.TextReplaceDto = TextReplaceDto; class TextJoinDto { constructor(list, separator) { /** * Text to join by * @default , */ this.separator = ","; if (list !== undefined) { this.list = list; } if (separator !== undefined) { this.separator = separator; } } } Text.TextJoinDto = TextJoinDto; class ToStringDto { constructor(item) { if (item !== undefined) { this.item = item; } } } Text.ToStringDto = ToStringDto; class ToStringEachDto { constructor(list) { if (list !== undefined) { this.list = list; } } } Text.ToStringEachDto = ToStringEachDto; class TextFormatDto { constructor(text, values) { /** * Text to format * @default Hello {0} */ this.text = "Hello {0}"; /** * Values to format * @default ["World"] */ this.values = ["World"]; if (text !== undefined) { this.text = text; } if (values !== undefined) { this.values = values; } } } Text.TextFormatDto = TextFormatDto; })(Text || (Text = {}));