UNPKG
alpinejs
Version:
latest (3.15.3)
3.15.3
3.15.2
3.15.1
3.15.0
3.14.9
3.14.8
3.14.7
3.14.6
3.14.5
3.14.4
3.14.3
3.14.2
3.14.1
3.14.0
3.13.10
3.13.9
3.13.8
3.13.7
3.13.6
3.13.5
3.13.4
3.13.3
3.13.2
3.13.1
3.13.0
3.12.3
3.12.2
3.12.1
3.12.0
3.11.1
3.11.0
3.10.5
3.10.4
3.10.3
3.10.2
3.10.1
3.10.0
3.9.6
3.9.5
3.9.4
3.9.3
3.9.2
3.9.1
3.9.0
3.8.1
3.8.0
3.7.1
3.7.0
3.6.1
3.6.0
3.5.2
3.5.1
3.5.0
3.4.2
3.4.1
3.4.0
3.3.5
3.3.4
3.3.3
3.3.2
3.3.1
3.3.0
3.2.4
3.2.3
3.2.2
3.2.1
3.2.0
3.1.1
3.1.0
3.0.9
3.0.8
3.0.7
3.0.6
3.0.5
3.0.4
3.0.3
3.0.2
3.0.1
3.0.0
2.8.2
2.8.1
2.8.0
2.7.3
2.7.2
2.7.1
2.7.0
2.6.0
2.5.0
2.4.1
2.4.0
2.3.5
2.3.4
2.3.3
2.3.2
2.3.1
2.3.0
2.2.5
2.2.4
2.2.3
2.2.2
2.2.1
2.2.0
2.1.2
2.1.1
2.1.0
2.0.2
2.0.1
2.0.0
1.12.0
1.11.1
1.11.0
1.10.1
1.10.0
1.9.8
1.9.7
1.9.6
1.9.5
1.9.4
1.9.3
1.9.2
1.9.1
1.9.0
1.8.2
1.8.1
1.8.0
1.7.0
1.6.2
1.6.1
1.6.0
1.5.0
1.4.0
1.3.1
1.3.0
1.2.0
1.1.5
1.1.4
1.1.3
1.1.2
1.1.1
1.0.0
<div dir="rtl">
github.com/alpinejs/alpine
alpinejs/alpine
alpinejs
/
src
/
directives
/
text.js
9 lines
(7 loc)
•
265 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
export
function
handleTextDirective
(
el, output, expression
) {
// If nested model key is undefined, set the default value to empty string.
if
(output ===
undefined
&&
String
(expression).
match
(
/\./
)) { output =
''
} el.
textContent
= output }