Code Monkey home page Code Monkey logo

filecomparison's Introduction

Actions Status Node CI Maintainability Test Coverage

File Comparison

File Comparison is a robust command-line utility engineered to detect differences between two configuration files. Developed using JavaScript and Node.js, the application supports both JSON and YAML file formats, making it versatile and applicable to a variety of use cases.

Description

FileComparison analyzes two configuration files and generates a detailed report outlining the differences. This utility leverages the power of the Commander npm package to facilitate the handling of command-line inputs.

The solution employs a set of purpose-built functions to deliver this functionality: The output is customizable, allowing users to select from three distinct report formats: stylish, plain, and json. The stylish format is the default, presenting data like a JSON object with nested fields represented through indentation. The plain format delivers the results in straightforward sentences, while the json format presents the difference report as a JSON object.

Usage

Use the following command format to execute the utility:

gendiff [options] <filepath1> <filepath2>

Options:

  • -V, --version: Output the version number
  • -f, --format [type]: Specify the output format (options: "stylish", "plain", "json"; default: "stylish")
  • -h, --help: Display command help

stylish:

npm run bin/gendiff.js -f stylish file1.json file2.json

plain:

npm run bin/gendiff.js -f plain file1.json file2.json

json:

npm run bin/gendiff.js -f json file1.json file2.json

Technologies Used

FileComparison is built with a stack of powerful technologies:

  • JavaScript and Node.js: The backbone of the application, providing the runtime environment.
  • Commander.js: Handles command-line inputs.
  • Lodash: Offers a comprehensive set of utility functions to streamline code.
  • js-yaml: Parses YAML files.

On the development side, the project utilizes:

  • Jest: Facilitates testing of the application.
  • ESLint: Ensures adherence to code quality standards.
  • eslint-config-airbnb-base, eslint-plugin-fp, eslint-plugin-import, eslint-plugin-jest: Provides additional eslint rules.

License

FileComparison is licensed under the ISC license.

filecomparison's People

Contributors

opifexm 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.