diff library of javascript
// Calculate the difference between two strings
var diff = diffutils.diff("moriyama", "hogeyama"); // returns patch string
// Apply a patch to string
var patched = diffutils.patch("moriyama", diff); // hogeyama
/*
patch format:
@@ -1,7 +1,7 @@
[-m-]{+h+}o[-ri-]{+ge+}yam
*/
diffutils.js uses the build tool grunt.
Performance improvement
Line-by-line diff
Apply patch with better matching
Copyright (c) 2013 rtsan
Licensed under the MIT license.