
Security News
White House Authorizes Private Companies to Conduct Offensive Cyber Operations
A new federal program will let vetted U.S. cybersecurity firms help investigate and disrupt foreign cybercrime groups under government direction.
node-diff3
Advanced tools
This is a node.js library for text diffing and three-way-merge.
It originally came from project Synchrotron, created by Tony Garnock-Jones. For more detail please visit:
patch: function (file, patch)
Applies a patch to a file.
Given file1 and file2, diff.patch(file1, diff.diffPatch(file1, file2)) should give file2.
diffIndices: function(file1, file2)
We apply the LCS to give a simple representation of the offsets and lengths of mismatched chunks in the input files. This is used by diff3MergeIndices below.
diff3MergeIndices: function (a, o, b)
Given three files, A, O, and B, where both A and B are independently derived from O, returns a fairly complicated internal representation of merge decisions it's taken. The interested reader may wish to consult
Sanjeev Khanna, Keshav Kunal, and Benjamin C. Pierce. "A Formal Investigation of Diff3." In Arvind and Prasad, editors, Foundations of Software Technology and Theoretical Computer Science (FSTTCS), December 2007.
diff3Merge: function (a, o, b, excludeFalseConflicts)
Applies the output of diff.diff3MergeIndices to actually construct the merged file; the returned result alternates between "ok" and "conflict" blocks.
merge: function (a, o, b)
build a merge file.
mergeDigIn: function (a, o, b)
build a digin style merge file.
FAQs
A JavaScript module for text diffing and three-way-merge.
The npm package node-diff3 receives a total of 99,948 weekly downloads. As such, node-diff3 popularity was classified as popular.
We found that node-diff3 demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
A new federal program will let vetted U.S. cybersecurity firms help investigate and disrupt foreign cybercrime groups under government direction.

Research
/Security News
The campaign amassed more than 75,000 installs by targeting Russian-speaking users seeking access to blocked services.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.