# vue-tiny-model

> tiny model layer for vue3

Latest version **0.0.1** (published 2020-10-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install vue-tiny-model
pnpm add vue-tiny-model
yarn add vue-tiny-model
bun add vue-tiny-model
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2020-10-21 |
| First published | 2020-10-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 59.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | houfeng |
| Maintainers | houfeng |
| Keywords | vue, vue3, reactivity, model |

## Links

- npm: https://www.npmjs.com/package/vue-tiny-model
- Repository: https://github.com/houfeng0923/vue-tiny-model
- Issues: https://github.com/houfeng0923/vue-tiny-model/issues
- npm.io page: https://npm.io/package/vue-tiny-model

## Dependencies (1)

- [@vue/reactivity](https://npm.io/package/@vue/reactivity.md) ^3.0.1

## Recent versions

- 0.0.1 (latest) — 2020-10-21

## README

# Tiny Model layer for vue3

### Usage

```
import { bind, defineModel } from 'vue-tiny-model';

interface IQuote {
  bid: number;
  ask: number;
  mid: number;
}

const Quote = defineModel<IQuote>({
  bid: null,
  ask: null,
  mid: bind<IQuote>(function () {
    return (this.ask + this.bid) / 2;
  }),
});

const raw = response.data;

const quote = new Quote(raw);


```

### Development

#### Install

Install the dependencies with [`yarn`](https://yarnpkg.com/en/):

```
yarn
```

#### Build

```
yarn build --watch
```

#### Test

```
yarn test --watch
```

### License

[MIT](LICENSE)

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