# minimvc

> Lightweight mvc for basic data binding between a json object and the DOM

Latest version **1.2.0** (published 2020-04-07) · ISC license · 0 weekly downloads

## Install

```sh
npm install minimvc
pnpm add minimvc
yarn add minimvc
bun add minimvc
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.0 |
| Published | 2020-04-07 |
| First published | 2020-04-07 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | George Bishop |
| Maintainers | rootgog |

## Links

- npm: https://www.npmjs.com/package/minimvc
- npm.io page: https://npm.io/package/minimvc

## Recent versions

- 1.2.0 (latest) — 2020-04-07
- 1.1.0 — 2020-04-07
- 1.0.2 — 2020-04-07
- 1.0.1 — 2020-04-07
- 1.0.0 — 2020-04-07

## README

# MiniMVC

MiniMVC is a lightweight solution to bind javascript objects to DOM elements

## Get Started

### 1. Include the module

```js
import MVC from "https://unpkg.com/minimvc";
```

### 2. Initialise MiniMVC

```js
let data = {
    header = "My first blog post"
}

let mvc = new MVC({data});
```

### 3. Edit the DOM

```html
<h1 data-bind="header"></h1>
<p data-bind="paragraph">
  Lorem ipsum dolor sit, amet consectetur adipisicing elit. Pariatur rerum
  consectetur nemo accusantium, quos nisi fuga eius explicabo! Est qui commodi,
  doloribus fugiat in eveniet iste iure neque voluptatem vel.
</p>
```

## Parameters

MiniMVC can accept two parameters

| Parameter     | Description                                                                    | Default           |
| ------------- | ------------------------------------------------------------------------------ | ----------------- |
| data          | An Object that contains all of the data that is to be syncronised with the DOM | MiniMVC.data = {} |
| bindAttribute | The attribute that will be used in the HTML to identify it's data equivelent   | data-bind         |

## TODO:

- Support Nested data object

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