vue-computed-eager 1.0.13 → 1.0.14
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 +1 -1
- package/README.github.md +0 -38
- package/README.npm.md +0 -38
package/package.json
CHANGED
package/README.github.md
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
<p align="center">
|
|
2
|
-
<img src="banner.svg" alt="vue-computed-eager" width="100%" />
|
|
3
|
-
</p>
|
|
4
|
-
|
|
5
|
-
<h1 align="center">vue-computed-eager</h1>
|
|
6
|
-
|
|
7
|
-
<p align="center">A Vue 3 composition API utility that creates computed properties which evaluate immediately when dependencies change, rather than lazily on access. Ideal for simple boolean checks with rarely-changing values. Note: Vue 3.4+ has built-in optimization making this less necessary.</p>
|
|
8
|
-
|
|
9
|
-
<p align="center">
|
|
10
|
-
<a href="https://www.npmjs.com/package/vue-computed-eager"><img src="https://img.shields.io/npm/v/vue-computed-eager.svg" alt="npm version" /></a>
|
|
11
|
-
<a href="https://www.npmjs.com/package/vue-computed-eager"><img src="https://img.shields.io/npm/dm/vue-computed-eager.svg" alt="npm downloads" /></a>
|
|
12
|
-
</p>
|
|
13
|
-
|
|
14
|
-
## Installation
|
|
15
|
-
|
|
16
|
-
```bash
|
|
17
|
-
npm install vue-computed-eager
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
## Usage
|
|
21
|
-
|
|
22
|
-
```ts
|
|
23
|
-
import { computedEager } from 'vue-computed-eager'
|
|
24
|
-
import { ref } from 'vue'
|
|
25
|
-
|
|
26
|
-
const todos = ref([])
|
|
27
|
-
const hasOpenTodos = computedEager(() => !!todos.value.length)
|
|
28
|
-
|
|
29
|
-
console.log(hasOpenTodos.value) // false
|
|
30
|
-
todos.value.push({ title: 'Learn Vue' })
|
|
31
|
-
console.log(hasOpenTodos.value) // true
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
## License
|
|
35
|
-
|
|
36
|
-
MIT
|
|
37
|
-
|
|
38
|
-
Extracted from [VueUse](https://vueuse.org/) for standalone use.
|
package/README.npm.md
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
<p align="center">
|
|
2
|
-
<img src="logo.svg" alt="vue-computed-eager" width="180" />
|
|
3
|
-
</p>
|
|
4
|
-
|
|
5
|
-
<h1 align="center">vue-computed-eager</h1>
|
|
6
|
-
|
|
7
|
-
<p align="center">A Vue 3 composition API utility that creates computed properties which evaluate immediately when dependencies change, rather than lazily on access. Ideal for simple boolean checks with rarely-changing values. Note: Vue 3.4+ has built-in optimization making this less necessary.</p>
|
|
8
|
-
|
|
9
|
-
<p align="center">
|
|
10
|
-
<a href="https://www.npmjs.com/package/vue-computed-eager"><img src="https://img.shields.io/npm/v/vue-computed-eager.svg" alt="npm version" /></a>
|
|
11
|
-
<a href="https://www.npmjs.com/package/vue-computed-eager"><img src="https://img.shields.io/npm/dm/vue-computed-eager.svg" alt="npm downloads" /></a>
|
|
12
|
-
</p>
|
|
13
|
-
|
|
14
|
-
## Installation
|
|
15
|
-
|
|
16
|
-
```bash
|
|
17
|
-
npm install vue-computed-eager
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
## Usage
|
|
21
|
-
|
|
22
|
-
```ts
|
|
23
|
-
import { computedEager } from 'vue-computed-eager'
|
|
24
|
-
import { ref } from 'vue'
|
|
25
|
-
|
|
26
|
-
const todos = ref([])
|
|
27
|
-
const hasOpenTodos = computedEager(() => !!todos.value.length)
|
|
28
|
-
|
|
29
|
-
console.log(hasOpenTodos.value) // false
|
|
30
|
-
todos.value.push({ title: 'Learn Vue' })
|
|
31
|
-
console.log(hasOpenTodos.value) // true
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
## License
|
|
35
|
-
|
|
36
|
-
MIT
|
|
37
|
-
|
|
38
|
-
Extracted from [VueUse](https://vueuse.org/) for standalone use.
|