Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including diff_match_patch with all npm packages installed. Try it out:

var diffMatchPatch = require("diff_match_patch")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

diff_match_patch v0.1.1

node module package of the Neil Fraser's diff_match_patch javascript library

#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.

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free