Differ
This package helps sending the HTML content of a page to a remote origin repeatedly.
It keeps internal state of the last HTMLs it saw and only sends the delta.
const differ = require('delta-differ');
const diffClient = new differ.DiffClient((ticket) => {
return differ.delta(ticket);
});
const pageHtml = diffClient.sync();
const newPageHtml = diffClient.sync();
Syncing other things
The delta function accepts a second "getHtml" argument that's useful for getting something other than the page body's html.
Tests
Run the linter with npm run lint
Run unit tests with npm run unit
Run e2e tests with npm run e2e
Run the benchmarks with npm run bench