deep-diff js library rewritten in typescript
npm install datum-diff
import { deepDiff } from "datum-merge";
const datumDiff: Partial = deepDiff(target, source);
`
or use the existing library interfaces now with types :
`
import { diff, Diff, applyChange } from "datum-merge";
const simpleDiff: Diff[] = diff(target, source);
for (const dif of simpleDiff) { applyChange(target, null, dif); }
import { Diff, accumulateDiff, PreFilter, Accumulator } from "datum-merge";
const customDiff: Diff[] = accumulateDiff(target, source, prefilter, accum, orderIndep);
`
or for usage on browser environments:
`
`
see the readme in the original library for detailed examples .
datum-diff
module recently published as a standalone package datum-diff
works as a drop-in replacement for the package deep-diff
simply use datum-diff instead of the datum-merge` libary in the examples above .