Hypertext.from() Static Method
Create a Hypertext
object from a value.
If the value is a string, it is escaped. If the value is an array, it is recursively converted to HTML. If the value is an object with a __html
property, it is used as is. If the value is null
or undefined
, it is converted to an empty string. Otherwise, it is converted to a string and escaped.
Signature
static from(html: any): Hypertext;
Parameters
Parameter | Type | Description |
---|---|---|
html | any | |
(Returns) | Hypertext |