Skip to content

Repository files navigation

Gendiff

Gendiff is a program that determines the difference between two data structures.

Utility capabilities:

  • support for different input formats: yaml, json;
  • generating a report in plain text, stylish and json.

Node CI Maintainability Test Coverage

Requirements

Node.js v13.2.0 and more

Installation

$ make install
$ sudo* npm link

* - optional

Usage

$ gendiff [format] path1 path2

For more information use:

$ gendiff -h

Usage example

# plain format
$ gendiff --format plain path/to/file.yml another/path/file.json

Property 'common.follow' was added with value: false
Property 'group1.baz' was updated. From 'bas' to 'bars'
Property 'group2' was removed

# stylish format
$ gendiff filepath1.json filepath2.json

{
  + follow: false
    setting1: Value 1
  - setting2: 200
  - setting3: true
  + setting3: {
        key: value
    }
  + setting4: blah blah
  + setting5: {
        key5: value5
    }
}

Stylish formatter asciinema

asciicast

Plain formatter asciinema

asciicast

Json formatter asciinema

asciicast

About

Program that determines the difference between two data structures

Resources

Stars

0 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages