tnwinc/htmldiff.js — pull request #3 by recurrence (2013-06-27 07:00:01+00:00)
Title: Add Dual Pane Support

Dual Pane view is a popular diff format. This change adds support for dual pane view via the 3rd argument to diff (a boolean dual pane flag).

A dual pane diff returns two key-pairs. The 'before' key's value is the before input with deletions. The 'after' key's value is the after input with insertions.

Sample usage:
diff = require('./htmldiff.js');

console.log(diff('

this is some of the text

', '

this some more of the text

'));
console.log(diff('

this is some of the text

', '

this some more of the text

', true));