This repository has been archived on 2021-09-06. You can view files and clone it, but cannot push or open issues or pull requests.
|
export default {
|
|
finalCounter(state) {
|
|
return state.counter * 3;
|
|
},
|
|
normalizedCounter(_, getters) {
|
|
const finalCounter = getters.finalCounter;
|
|
if (finalCounter < 0) {
|
|
return 0;
|
|
}
|
|
if (finalCounter > 100) {
|
|
return 100;
|
|
}
|
|
return finalCounter;
|
|
}
|
|
};
|