three way merge json structures
npm install json-diff3Experimental 3-way JSON merge library.
Usage:
``typescript
import { diff3 } from 'json-diff3';
const state1 = {
hello: 1,
world: 2,
};
const state2 = {
hello: 1,
world: 2,
a: 2,
};
const state3 = {
hello: 1,
world: 3,
};
diff3(state1, state2, state3)
// =>
// {
// hello: 1,
// world: 3,
// a: 2,
// }
``