Gendiff – a program that detects the difference between two data structures.
$ git clone git@github.com:VadimFilimonov/frontend-project-lvl2.git
$ make install
$ npm link
$ gendiff [options] <filepath1> <filepath2>
Options:
-V, --version
output the version-f, --format [type]
output format[type]
- stylish, plain, json
-h, --help
output usage information
<filepath>
- path to json or yaml file
file1.json
{
"host": "hexlet.io",
"timeout": 50,
"proxy": "123.234.53.22",
"follow": false
}
file2.json
{
"timeout": 20,
"verbose": true,
"host": "hexlet.io"
}
file1.yml
host: hexlet.io,
timeout: 50,
proxy: 123.234.53.22,
follow: false
file2.yml
timeout: 20,
verbose: true,
host: hexlet.io
file1.json
{
"common": {
"setting1": "Value 1",
"setting2": 200,
"setting3": true,
"setting6": {
"key": "value",
"doge": {
"wow": ""
}
}
},
"group1": {
"baz": "bas",
"foo": "bar",
"nest": {
"key": "value"
}
},
"group2": {
"abc": 12345,
"deep": {
"id": 45
}
}
}
file2.json
{
"common": {
"follow": false,
"setting1": "Value 1",
"setting3": null,
"setting4": "blah blah",
"setting5": {
"key5": "value5"
},
"setting6": {
"key": "value",
"ops": "vops",
"doge": {
"wow": "so much"
}
}
},
"group1": {
"foo": "bar",
"baz": "bars",
"nest": "str"
},
"group3": {
"deep": {
"id": {
"number": 45
}
},
"fee": 100500
}
}
Next examples have same json files