Skip to content

Compares two configuration files and shows a difference.

Notifications You must be signed in to change notification settings

Rabinzon/cl-diff-tool

Repository files navigation

cl-diff-tool

Compares two configuration files and shows a difference.

Build Status

Usige

$ npm i -g cl-diff-tool
$ gendiff [options] <firstConfig> <secondConfig>

Options

-h, --help           output usage information
-V, --version        output the version number
-f, --format [json|plain]  output format

Example

$ cat data1.json

{
	"name":"John",
	"age":30,
	"cars":[ "Ford", "BMW", "Fiat" ]
}
$ cat data2.json

{
	"name":"John",
	"age":50,
	"cars": ["Tesla"],
	"children": {
		"name": "Den",
		"age": 20,
		"cars": "BMW"
	}
}
$ gendiff data1.json data2.json
{
    name: John
  + age: 50
  - age: 30
    cars: {
      + 0: Tesla
      - 0: Ford
      - 1: BMW
      - 2: Fiat
    }
  + children: {
        name: Den
        age: 20
        cars: BMW
    }
}

About

Compares two configuration files and shows a difference.

Resources

Stars

Watchers

Forks

Packages

No packages published