Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation

Hexlet tests and linter status:

Actions Status Maintainability Test Coverage Node CI

Info:

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.

Install:

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

Run test (optional):

make test

asciicast

Usability

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);

Examples

Main menu

asciicast

Difference between two files with default output format

asciicast

Difference between two files with default with special format (stylish/plain/json)

asciicast

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages