vue-computed-eager 1.0.0 → 1.0.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.
Files changed (2) hide show
  1. package/README.md +7 -6
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -32,14 +32,15 @@ Learn more at [Vue: When a computed property can be the wrong tool](https://dev.
32
32
  - Use `computedEager()` when you have a simple operation, with a rarely changing return value – often a boolean.
33
33
 
34
34
  ```ts
35
- import { computedEager } from 'vue-computed-eager'
35
+ import { ref } from 'vue';
36
+ import { computedEager } from 'vue-computed-eager';
36
37
 
37
- const todos = ref([])
38
- const hasOpenTodos = computedEager(() => !!todos.length)
38
+ const todos = ref([]);
39
+ const hasOpenTodos = computedEager(() => !!todos.value.length);
39
40
 
40
- console.log(hasOpenTodos.value) // false
41
- toTodos.value.push({ title: 'Learn Vue' })
42
- console.log(hasOpenTodos.value) // true
41
+ console.log(hasOpenTodos.value); // false
42
+ todos.value.push({ title: 'Learn Vue' });
43
+ console.log(hasOpenTodos.value); // true
43
44
  ```
44
45
 
45
46
  ## License
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-computed-eager",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Eager computed",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",
@@ -44,4 +44,4 @@
44
44
  "typescript": "^5.0.0",
45
45
  "vue": "^3.4.0"
46
46
  }
47
- }
47
+ }