This is the second project from Hexlet.
With this library you can compare and display the differences between two files with extensions .json, .yaml , yml.
1. Clone this repository "git clone git@github.com:a-shein/fullstack-javascript-project-46.git"
2. cd fullstack-javascript-project-46
3. make install
4. make link
make test
For call helper:
$ gendiff -h
Usage: gendiff [options] <filepath1> <filepath2>
Compares two configuration files and shows a difference.
Options:
-V, --version output the version number
-f, --format <type> output format (default: "stylish")
-h, --help display help for command
-----------------------------------------------------------------------------
//This application support output formats (-f option): stylish, plain, json//
Import and use in your project
import genDiff from '@hexlet/code';
const diff = genDiff(filepath1, filepath2, format);
console.log(diff);
Main menu
Difference between two files with default output format
Difference between two files with default with special format (stylish/plain/json)