__ ___ ___
/\ \ /'___\ /'___\
\_\ \ __ __ /\ \__//\ \__/ __ __
/ __ \ /'__ \ /'__ \ \ .__\ \ .__\/\ \/\ \
/\ \L\ \/\ __//\ __/\ \ \_/\ \ \_/\ \ \_\ \
\ \_____\ \____\ \____\\ \_\ \ \_\ \/`____ \
\/____ /\/____/\/____/ \/_/ \/_/ `/___/> \
/\___/
\/__/
I am a cli tool for comparing two json/yaml files and show the difference between them.
npm i -g deeffy
deeffy <filepath1> <filepath2>
# or
deeffy -f stylish <filepath1> <filepath2>
Example:
user $ deeffy file1.json file2.json
# output
{
- follow: false
host: hexlet.io
- proxy: 123.234.53.22
- timeout: 50
+ timeout: 20
+ verbose: true
}
deeffy -f plain <filepath1> <filepath2>
Example:
user $ deeffy -f plain file1.json file2.json
# output
Property 'follow' was removed
Property 'proxy' was removed
Property 'timeout' was updated. From 50 to 20
Property 'verbose' was added with value: true
deeffy -f json <filepath1> <filepath2>
Example:
user $ deeffy -f json file1.json file2.json
# output
[
{
"key": "follow",
"type": "deleted",
"oldValue": false
},
{
"key": "host",
"type": "unchanged",
"oldValue": "hexlet.io"
},
{
"key": "proxy",
"type": "deleted",
"oldValue": "123.234.53.22"
},
{
"key": "timeout",
"type": "changed",
"oldValue": 50,
"newValue": 20
},
{
"key": "verbose",
"type": "added",
"newValue": true
}
]
Have a great experience with me 🌎