Skip to content

Latest commit

 

History

History
29 lines (19 loc) · 480 Bytes

README.md

File metadata and controls

29 lines (19 loc) · 480 Bytes

html-patcher

Virtual DOM Diff & Patch with HTML Templates. Based on the virtual-dom on NPM

Install

$ npm install html-patch

Usage

A simple app to show epoch time every second:

var patcher = require('html-patcher')

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

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

function render () {
  return '<h1>' + Date.now() +  '</h1>';
}

See test.js for more info.