input-diff
v1.0.3
Published
A diff well suited for text input
Readme
input-diff

When text input changes, the following premises are usually true:
- If the new text is longer than the old, it means something was inserted
- If the new text is shorter than the old, it means something was removed
input-diff finds the LCS when those premises are met, and a valid diff when they're not, with few iterations.
Sample usage
var diff = require('input-diff'),
data;
data = diff.get('Hello','Hello world');
console.log( diff.apply('Hello',data) ); // Hello world