# vuex-enhance

> Enhance typescript class module support for Vuex.

Latest version **0.0.103** (published 2020-08-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install vuex-enhance
pnpm add vuex-enhance
yarn add vuex-enhance
bun add vuex-enhance
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.103 |
| Published | 2020-08-15 |
| First published | 2020-07-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 15.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | edonet |
| Maintainers | edonet |

## Links

- npm: https://www.npmjs.com/package/vuex-enhance
- Repository: git@github.com:edonet/vuex-enhance
- npm.io page: https://npm.io/package/vuex-enhance

## Recent versions

- 0.0.103 (latest) — 2020-08-15
- 0.0.102 — 2020-07-26
- 0.0.101 — 2020-07-26

## README

# vuex-enhance
Enhance typescript class module support for Vuex.

## Install
``` shell
$ yarn add vuex-enhance
```

## Usage
``` typescript
import Vue from  'vue';
import Vuex from 'vuex';
import createStore from 'vuex-enhance';

/* Todo class module */
class Todo {

    /* state: keyword */
    keyword = '';

    /* state: data */
    data: string[] = [];

    /* getter: list */
    get list() {
        if (this.keyword) {
            return this.data.filter((value) => value.includes(this.keyword));
        } else {
            return this.data;
        }
    }

    /* action: add */
    add(value: string): void {
        if (value) {
            this.data = [...this.data, value];
        }
    }
}

/** install vuex */
Vue.use(Vuex);

/** create store */
export default createStore({ modules: { todo } });
```

---
_Source: https://npm.io/package/vuex-enhance · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
