diff3

A diff3 engine for nodejs

diff3 downloads diff3 version diff3 license

diff3Similar Packages:
Npm Package Weekly Downloads Trend
3 Years
🌟 Show real-time usage chart on diff3's README.md, just copy the code below.
## Usage Trend
[![Usage Trend of diff3](https://npm-compare.com/img/npm-trend/THREE_YEARS/diff3.png)](https://npm-compare.com/diff3#timeRange=THREE_YEARS)
Cumulative GitHub Star Trend
🌟 Show GitHub stars trend chart on diff3's README.md, just copy the code below.
## GitHub Stars Trend
[![GitHub Stars Trend of diff3](https://npm-compare.com/img/github-trend/diff3.png)](https://npm-compare.com/diff3)
Stat Detail
Package
Downloads
Stars
Size
Issues
Publish
License
diff3603,7321311.9 kB2-MIT
README for diff3

diff3

Usage

var diff3Merge = require('diff3');
var a = ['a', 'text', 'file'];
var o = ['a', 'test', 'file'];
var b = ['a', 'toasty', 'filtered', 'file'];
var diff3 = diff3Merge(a, o, b);

Output

[{
    "ok": ["a"]
}, {
    "conflict": {
        "a": ["text"],
        "aIndex": 1,
        "o": ["test"],
        "oIndex": 1,
        "b": ["toasty", "filtered"],
        "bIndex": 1
    }
}, {
    "ok": ["file"]
}]