0.0.1 • Published 4 years ago

vue-tiny-model v0.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

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:

yarn

Build

yarn build --watch

Test

yarn test --watch

License

MIT