Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Repackaging of Neil Fraser's world famous diff_match_patch as a node.js module
JavaScript
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
tests
.gitignore
README.markdown
package.json

README.markdown

diff_match_patch

a re-packaging of the javascript library by Neil Fraser for use in server side javascript

Installation

npm install diff_match_patch

Usage

Just like the original library, you'll be using instances of the diff_match_patch class: dmpmod = require('diff_match_patch') var dmp = new dmpmod.diff_match_patch(); text1= "I'm some text"; text2= "I'm some other text"; puts(dmp.diff_main(text1, text2));//print the difference of the texts

(for more detailed documentation, as well as a complete overview of the API, please refer to the original project site ).

Something went wrong with that request. Please try again.