npm install htmldiff
|10||downloads in the last month|
|Version||0.0.4 last updated 2 years ago|
|Keywords||diff, htmldiff, html|
htmldiff.js is a CoffeeScript port of https://github.com/myobie/htmldiff
(This one has a few more tests.)
This is diffing that understands HTML. Best suited for cases when you want to show a diff of user-generated HTML (like from a wysiwyg editor).
You use it like this:
diff = require 'htmldiff.js' console.log diff '<p>this is some text</p>', '<p>this is some more text</p>'
And you get:
<p>this is some <ins>more </ins>text</p>
It should be multi-module aware. ie. it should work as a node.js module or an AMD (RequireJS) module, or even just as a script tag.
Licensed under the MIT License. See the
LICENSE file for details.