Difference Generator - is a program that identifies the difference between two data structures. The program can be used as a command-line utility or installed as a library in third-party applications.
Features:
- Input formats: YAML, YML, JSON.
- Formats to display:
- STYLISH (default) - output of differences in text format;
- PLAIN - output of differences in the form of a tree structure;
- JSON - output differences in JSON format. This format allows you to use the output in machine reading.
To get help information about utility use default help option -h, --help
gendiff -h
Node.js >= v16.9.0
make install
npm link
gendiff __fixtures__/file1.json __fixtures__/file2.json
gendiff __fixtures__/file1.yml __fixtures__/file2.yaml
gendiff --format stylish __fixtures__/file3.json __fixtures__/file4.json
gendiff --format plain __fixtures__/file3.json __fixtures__/file4.yaml
gendiff --format json __fixtures__/file3.json __fixtures__/file4.yaml