Skip to content

Latest commit

 

History

History
100 lines (96 loc) · 3.27 KB

README.md

File metadata and controls

100 lines (96 loc) · 3.27 KB

Hexlet tests and linter status:

Actions Status Maintainability Test Coverage Node CI

🎭 Gen difference is an application that helps you find the difference.

This project is a console application that allows you to merge two files for changes. Supported file types are Json and Yaml. The format of the result of the changes is displayed on the screen and is available in the Json, Plain Text and Classic Cascading formats.

📦 Installation Guide

  • Installation

  • $git clone https://github.com/BellatorJS/frontend-project-lvl2
    $make install
  • Check of launch

  • $gendiff -h

    🚀 Launch and demo of gendiff

    Demonstration of the results of comparing two files of a nested structure in accessible formats.

    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
      }
    }
      	

    Demonstration of the output of the difference in the default format - stylish.

    $gendiff file1.json file2.json

    Demonstration of the output of the difference in the format - plain text.

    $gendiff -f plain file1.json file2.json

    <

    Demonstration of the output of the difference in the format - JSON.

    $gendiff -f json file1.json file2.json