Skip to content

Yar56/gen-diff-cli

Repository files navigation


Difference CalculatorLogo of the project

Command line app to search for differences between two files


Hexlet tests and linter status:

Actions Status CI

Maintainability Test Coverage

What is Mind Games?

A difference calculator is a program that determines the difference between two data structures. This is a popular task, for which there are many online services, e.g. JSON Diff

Features of the utility:

  • Supports different input formats: yaml, json
  • Report generation as plain text, stylish and json

Requirements

You need Node.js installed on your machine. ( node-version: [14.x] )

Installing / Getting started

make install
make publish
npm link

Flat files

json vs json or yaml vs yaml or json vs yaml

$ genfiff filepath1 filepath2

The function takes paths to flat files and returns the difference in plain text.

asciinema (JSON)

asciicast


asciinema (YML)

asciicast


Nested files

json vs json or yaml vs yaml or json vs yaml

$ genfiff filepath1 filepath2

The function takes paths to nested files and returns the difference in stylish format.

asciinema (SON and YML)

asciicast


Formats

stylish (default format)

$ genfiff filepath1 filepath2

plain

$ genfiff -f plain filepath1 filepath2
asciinema (stylish and plain)

asciicast


json

$ genfiff -f json filepath1 filepath2
asciinema (json format)

asciicast

About

Command line utility to compare two json(yml) files

Resources

Stars

Watchers

Forks

Packages

No packages published