This package is designed to "diff" two pieces of data and produce output that can be used to explore the differences.
There is a standard for representing differences between JSON structures as a patch, but the goal there is to produce output that can be used to faithfully "undo" and "redo" a given set of changes.
Our goal is to produce a more expansive structure that includes:
- Information that has not changed.
- Information that has been removed.
- Information that has been added.
- Detailed information about changes to a single string.
The focus here is not on changes to the deep structure, only changes in values (strings, numbers, etc.) are represented.
This is intended to provide just enough information to present an annotated representation of a given set of changes.
For this purpose, there are Handlebars templates provided in this package, which can be used
fluid-handlebars to convert the "diff" JSON structure
produced by this package into:
To add this package to your project, use a command like
npm install --save fluid-diff.