Skip to content

Gendiff - NodeJS program that determines the difference between two data structures. Complex architectural solution, functional programming, tree data structures and recursive algorithms.

Notifications You must be signed in to change notification settings

Omny/Gendiff-NodeJS-program

Repository files navigation

Hexlet tests and linter status:

Actions Status Maintainability Test Coverage Node CI

Gendiff - NodeJS console utility

A program that determines the difference between two data structures.

In this project, I improved my skills in developing complex architectural solutions, automated testing and continuous integration, functional programming, working with tree data structures and recursive algorithms.

Requirements

Node.js v14 and higher.

How to install:

make install

npm link

How to use:

Two json or yaml files with tree structure. Output in stylish format.

asciicast

Two json or yaml files with tree structure. Output in plain format.

asciicast

Two json or yaml files with tree structure. Output in json format.

asciicast

Stylish format (default)

gendiff filepath1.json filepath2.json

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

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

Json format

gendiff --format json path/to/file.yml another/path/file.json

About

Gendiff - NodeJS program that determines the difference between two data structures. Complex architectural solution, functional programming, tree data structures and recursive algorithms.

Resources

Stars

Watchers

Forks

Packages

No packages published