@anastassin/difference-calculator
[![Maintainability](https://api.codeclimate.com/v1/badges/31863e92491f55bbfc40/maintainability)](https://codeclimate.com/github/AnastasiyaYS/project-lvl2-s475/maintainability) [![Test Coverage](https://api.codeclimate.com/v1/badges/31863e92491f55bbfc40/te
Last updated 8 months ago by anastassin .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @anastassin/difference-calculator 
SYNC missed versions from official npm registry.

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

Current Tags

  • 1.6.0                                ...           latest (8 months ago)

11 Versions

  • 1.6.0                                ...           8 months ago
  • 1.5.5                                ...           8 months ago
  • 1.5.4                                ...           8 months ago
  • 1.5.3                                ...           8 months ago
  • 1.5.2                                ...           8 months ago
  • 1.5.1                                ...           8 months ago
  • 1.5.0                                ...           8 months ago
  • 1.4.0                                ...           8 months ago
  • 1.3.0                                ...           9 months ago
  • 1.2.0                                ...           9 months ago
  • 1.1.0                                ...           9 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 33
Last Day 0
Last Week 0
Last Month 0
Dependencies (5)
Dev Dependencies (12)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |