1.6.0 • Published 3 years ago

@anastassin/difference-calculator v1.6.0

Weekly downloads
1
License
ISC
Repository
github
Last release
3 years ago

project-lvl2-s475

Maintainability Test Coverage Build Status

Compares two configuration files and shows a difference.

Setup

$ sudo npm install -g @anastassin/difference-calculator

Usage

CLI application

Usage: gendiff [options] <firstConfig> <secondConfig>

Options:

  -V, --version        output the version number
  -f, --format [type]  Output format
  -h, --help           output usage information

Library

import genDiff from 'genDiff';
const diff = genDiff(pathToFile1, pathToFile2);
console.log(diff);

Run

Compare flat JSON files

$ gendiff firstPath.json secondPath.json

asciicast

Compare flat YAML files

$ gendiff firstPath.yml secondPath.yml

asciicast

Compare flat INI files

$ gendiff firstPath.ini secondPath.ini

asciicast

Compare tree files (JSON, YAML, INI)

$ gendiff firstPath.json secondPath.json

 or

$ gendiff firstPath.yml secondPath.ini

asciicast

Сhoose one of unstructured output formats: tree (by default) or plain

Display comparison in tree format (by default)

$ gendiff firstPath.yml secondPath.ini

Display comparison in plain format

$ gendiff -f plain firstPath.json secondPath.ini

asciicast

Choose JSON output format

$ gendiff -f json firstPath.ini secondPath.yml
1.6.0

3 years ago

1.5.5

3 years ago

1.5.4

3 years ago

1.5.3

3 years ago

1.5.2

3 years ago

1.5.1

3 years ago

1.5.0

3 years ago

1.4.0

3 years ago

1.3.0

3 years ago

1.2.0

3 years ago

1.1.0

3 years ago