@muscara/htmx-jsonata 0.0.1 → 0.0.3
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 +11 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,11 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
[htmx extension](https://htmx.org/extensions) that provides [jsonata](https://jsonata.org) query functionality for htmx elements
|
|
4
4
|
|
|
5
|
+
add the following to your project to begin.
|
|
6
|
+
```html
|
|
7
|
+
<script src="https://unpkg.com/@muscara/htmx-jsonata/htmx-jsonata.min.js"></script>
|
|
8
|
+
<!-- ... include htmx -->
|
|
9
|
+
<!-- ... include jsonata -->
|
|
10
|
+
```
|
|
11
|
+
|
|
5
12
|
> only GET request method is supported
|
|
6
13
|
|
|
7
14
|
## usage
|
|
8
15
|
|
|
9
16
|
```html
|
|
17
|
+
<script src="https://unpkg.com/@muscara/htmx-jsonata@0.0.1/htmx-jsonata.min.js"></script>
|
|
18
|
+
<script src="https://unpkg.com/htmx.org@1.9.10"></script>
|
|
19
|
+
<script src="https://cdn.jsdelivr.net/npm/jsonata@2.0.3/jsonata.min.js"></script>
|
|
20
|
+
|
|
10
21
|
<div jsonata-url="https://jsonplaceholder.typicode.com/users" jsonata="$[name='Leanne Graham']">
|
|
11
22
|
<h1 jsonata-property="name"></h1>
|
|
12
23
|
<p jsonata-property="phone"></p>
|