| Total Complexity | 3 |
| Complexity/F | 1 |
| Lines of Code | 16 |
| Function Count | 3 |
| Duplicated Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | import { defineStore } from 'pinia' |
||
| 2 | |||
| 3 | export const useCounterStore = defineStore({ |
||
| 4 | id: 'counter', |
||
| 5 | state: () => ({ |
||
| 6 | counter: 0 |
||
| 7 | }), |
||
| 8 | getters: { |
||
| 9 | doubleCount: (state) => state.counter * 2 |
||
| 10 | }, |
||
| 11 | actions: { |
||
| 12 | increment() { |
||
| 13 | this.counter++ |
||
| 14 | } |
||
| 15 | } |
||
| 16 | }) |
||
| 17 |