@zeix/ui-element
Version:
UIElement - a HTML-first library for reactive Web Components
38 lines (19 loc) • 699 B
Markdown
[**@zeix/ui-element**](../README.md)
***
[@zeix/ui-element](../globals.md) / asString
# Function: asString()
> **asString**\<`E`\>(`fallback?`): [`Parser`](../type-aliases/Parser.md)\<`string`, `E`\>
Defined in: [src/lib/parsers.ts:79](https://github.com/zeixcom/ui-element/blob/1e5ebee179adfc4619d3d0e9d2b864d1e97ba797/src/lib/parsers.ts#L79)
Parse a string as a string with a fallback
## Type Parameters
### E
`E` *extends* `Element` = `HTMLElement`
## Parameters
### fallback?
[`Fallback`](../type-aliases/Fallback.md)\<`string`, `E`\> = `''`
Fallback value or extractor function
## Returns
[`Parser`](../type-aliases/Parser.md)\<`string`, `E`\>
Parser function
## Since
0.11.0