jsdifflib
A javascript library for diffing text and generating corresponding HTML views. This is a fork of cemerick/jsdifflib which has been updated for use with browserify and node.js
Installation
npm install jsdifflib
Overview
jsdifflib is a Javascript library that provides:
- a partial reimplementation of Python’s difflib module (specifically, the SequenceMatcher class)
- a visual diff view generator, that offers side-by-side as well as inline formatting of file data
It puts data in a simple table that can be easilly re-styled using CSS
jsdifflib does not require jQuery or any other Javascript library.
Example
var difflib = ; { // build the diff view and return a DOM node return diffview;} documentbody;
License
BSD