Package Exports
- json0-ot-diff
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (json0-ot-diff) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
JSON0 OT Diff
Finds differences between two JSON object and generates operational transformation (OT) operations for transforming the first object into the second according to the JSON0 OT Type.
The current implementation only supports list/object insertion/deletion (i.e. li, ld, oi, od).
var jsondiff = require("./json0-ot-diff");
var diff = jsondiff(
["foo", "bar", 1, 2, 3],
["foo", "quux", 1, 2]
);
console.log(diff);
> [
> { p: [ 1 ], ld: 'bar', li: 'quux' },
> { p: [ 4 ], ld: 3 }
>]This was developed for JsonML with Webstrates in mind, but could be applicable in other situations.