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
- Host: GitHub
- URL: https://github.com/azer/html-patcher
- Owner: azer
- Created: 2014-09-14T11:47:53.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2015-05-16T20:38:36.000Z (about 11 years ago)
- Last Synced: 2024-11-08T01:41:32.736Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 176 KB
- Stars: 35
- Watchers: 4
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
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.