youtubei.js / Misc / Text
Class: Text
Constructors
new Text()
new Text(
data
):Text
Parameters
• data: RawNode
Returns
Defined in
src/parser/classes/misc/Text.ts:31
Properties
endpoint?
optional
endpoint:NavigationEndpoint
Defined in
src/parser/classes/misc/Text.ts:29
runs?
Defined in
src/parser/classes/misc/Text.ts:28
text?
optional
text:string
Defined in
src/parser/classes/misc/Text.ts:27
Methods
isEmpty()
isEmpty():
boolean
Checks if the text is empty.
Returns
boolean
Whether the text is empty.
Defined in
src/parser/classes/misc/Text.ts:197
toHTML()
toHTML():
undefined
|string
Converts the text to HTML.
Returns
undefined
| string
The HTML.
Defined in
src/parser/classes/misc/Text.ts:189
toString()
toString():
string
Converts the text to a string.
Returns
string
The text.
Defined in
src/parser/classes/misc/Text.ts:205
fromAttributed()
static
fromAttributed(data
):Text
Parameters
• data: AttributedText