@alpinejs/docs 3.13.2-revision.3 → 3.13.3-revision.1
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/package.json
CHANGED
|
@@ -307,6 +307,19 @@ By default, any data stored in a property via `x-model` is stored as a string. T
|
|
|
307
307
|
<span x-text="typeof age"></span>
|
|
308
308
|
```
|
|
309
309
|
|
|
310
|
+
<a name="boolean"></a>
|
|
311
|
+
### `.boolean`
|
|
312
|
+
|
|
313
|
+
By default, any data stored in a property via `x-model` is stored as a string. To force Alpine to store the value as a JavaScript boolean, add the `.boolean` modifier. Both integers (1/0) and strings (true/false) are valid boolean values.
|
|
314
|
+
|
|
315
|
+
```alpine
|
|
316
|
+
<select x-model.boolean="isActive">
|
|
317
|
+
<option value="true">Yes</option>
|
|
318
|
+
<option value="false">No</option>
|
|
319
|
+
</select>
|
|
320
|
+
<span x-text="typeof isActive"></span>
|
|
321
|
+
```
|
|
322
|
+
|
|
310
323
|
<a name="debounce"></a>
|
|
311
324
|
### `.debounce`
|
|
312
325
|
|
|
@@ -33,7 +33,7 @@ This is by far the simplest way to get started with Alpine. Include the followin
|
|
|
33
33
|
Notice the `@3.x.x` in the provided CDN link. This will pull the latest version of Alpine version 3. For stability in production, it's recommended that you hardcode the latest version in the CDN link.
|
|
34
34
|
|
|
35
35
|
```alpine
|
|
36
|
-
<script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.13.
|
|
36
|
+
<script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.13.3/dist/cdn.min.js"></script>
|
|
37
37
|
```
|
|
38
38
|
|
|
39
39
|
That's it! Alpine is now available for use inside your page.
|
package/src/en/plugins/anchor.md
CHANGED
|
@@ -32,7 +32,7 @@ You can include the CDN build of this plugin as a `<script>` tag, just make sure
|
|
|
32
32
|
|
|
33
33
|
### Via NPM
|
|
34
34
|
|
|
35
|
-
You can install
|
|
35
|
+
You can install Anchor from NPM for use inside your bundle like so:
|
|
36
36
|
|
|
37
37
|
```shell
|
|
38
38
|
npm install @alpinejs/anchor
|