An open API service indexing awesome lists of open source software.

https://github.com/azer/html-patcher

Virtual DOM Diff & Patch with HTML Templates
https://github.com/azer/html-patcher

Last synced: 11 months ago
JSON representation

Virtual DOM Diff & Patch with HTML Templates

Awesome Lists containing this project

README

          

## html-patcher

Virtual DOM Diff & Patch with HTML Templates. Based on [the virtual-dom on NPM](http://npmjs.org/virtual-dom)

## Install

```bash
$ npm install html-patch
```

## Usage

A simple app to show epoch time every second:

```js
var patcher = require('html-patcher')

var patch = patcher(document.body, render());

setInterval(function () {
patch(render())
}, 1000);

function render () {
return '

' + Date.now() + '

';
}
```

See `test.js` for more info.