Skip to content

elen-oz/difference-calculator

Repository files navigation

Files difference calculator

Hexlet tests and linter status:

Actions Status linter&jest Maintainability Test Coverage

Project Description

Difference Calculator is a program designed to determine the difference between two data structures. It supports various file formats including .json and .yaml, and can handle both flat and nested structures.

Features

  • Comparison of Flat Structures: The program can compare flat .json and .yaml files with a plain structure.
  • Comparison of Nested Structures: The program can compare .json files with a nested structure. It supports different output formats including STYLISH, PLAIN, and JSON.

Installation

Before you start, make sure you have Node.js and npm installed on your machine.

  1. Clone this repository to your local machine using https://github.com/elen-oz/difference-calculator.git
  2. Navigate to the project directory: cd difference-calculator
  3. Install all required dependencies with npm install

Usage

To use the Difference Calculator, run the command npm run diff-calc [file1] [file2]. Replace [file1] and [file2] with the paths to the files you want to compare.

Compare flat .json files with plain structure (example of the 3rd step):

asciicast

Compare flat .yaml files with plain structure (example of the 5th step):

asciicast

Compare .json files with nested structure and with default STYLYSH format (example of the 6th step):

asciicast

Compare files with nested structure and with PLAIN format (example of the 7th step):

asciicast

Compare files with nested structure and with JSON format (example of the 8th step):

asciicast

About

The second project on the Hexlet platform for the front-end development programme

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published