@muscara/htmx-jsonata 0.0.8 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +36 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -18,6 +18,41 @@
|
|
|
18
18
|
- `jn-path`: specifies a path to nested data (supports dot notation).
|
|
19
19
|
- `jn-each`: marks an element as a template to be cloned for each item in an array response.
|
|
20
20
|
|
|
21
|
-
##
|
|
21
|
+
## example
|
|
22
|
+
|
|
23
|
+
```html
|
|
24
|
+
<div
|
|
25
|
+
jn-url="https://status.powerschool.com/api/v2/summary.json"
|
|
26
|
+
jn-query="
|
|
27
|
+
components.(
|
|
28
|
+
$ConvertDate := function($date) {
|
|
29
|
+
$toMillis($date) ~> $fromMillis('[M]/[D]/[Y]')
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
{
|
|
33
|
+
'name': name,
|
|
34
|
+
'status': 'status',
|
|
35
|
+
'updated': $ConvertDate(updated_at)
|
|
36
|
+
}
|
|
37
|
+
)
|
|
38
|
+
"
|
|
39
|
+
>
|
|
40
|
+
<ul>
|
|
41
|
+
<li jn-each>
|
|
42
|
+
<p>
|
|
43
|
+
<span jn-path="name"></span>
|
|
44
|
+
<strong jn-path="status"></strong>
|
|
45
|
+
<small>
|
|
46
|
+
<em>
|
|
47
|
+
(last updated: <span jn-path="updated"></span>)
|
|
48
|
+
</em>
|
|
49
|
+
</small>
|
|
50
|
+
</p>
|
|
51
|
+
</li>
|
|
52
|
+
</ul>
|
|
53
|
+
</div>
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## playground
|
|
22
57
|
|
|
23
58
|
for live examples, use the [playground](https://htmx-jsonata.kevinmuscara.deno.net/)
|