Git Product home page Git Product logo

frontend-project-46's Introduction

Utility for comparison of two structured-data files with displaying differences

Hexlet tests and linter status:

Actions Status Maintainability Test Coverage Jest Node CI

Prerequisites

  • Node.js version 16 or higher.
  • Terminal for performing files comparison via command line interface (CLI).
  • Unix-like operating system.

Install

  1. Clone project to your computer.
# via HTTPS
git clone https://github.com/webdb81/frontend-project-46.git

# or via Github CLI
gh repo clone webdb81/frontend-project-46
  1. Go to the main directory of cloning project.
cd frontend-project-46
  1. Install all the necessary dependencies.
make install
  1. Linking package to be able to run commands. This command may require admin rights aka sudo.
make link

Viewing the help about the utility:

gendiff -h

asciicast

Usage example

Comparison of flat structures

gendiff filePath1.json filePath2.json

asciicast

Recursive comparison

Recursive comparison by default formatter styling:

gendiff __fixtures__/file1.json __fixtures__/file2.json
gendiff __fixtures__/file1.yml __fixtures__/file2.yml

Recursive comparison with setting formatter styling:

gendiff --format stylish __fixtures__/file1.json __fixtures__/file2.json
gendiff --format stylish __fixtures__/file1.yml __fixtures__/file2.yml

asciicast

«Flat» comparison for json-files

gendiff -f plain __fixtures__/file1.json __fixtures__/file2.json

asciicast

«Flat» comparison for yaml-files

gendiff -f plain __fixtures__/file1.yml __fixtures__/file2.yml

asciicast

Output of the compared data in a structured json-format

gendiff -f json __fixtures__/file1.json __fixtures__/file2.json
gendiff -f json __fixtures__/file1.yml __fixtures__/file2.yml

asciicast

frontend-project-46's People

Contributors

webdb81 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.