1.0.1 • Published 7 years ago

project-lvl2-s18 v1.0.1

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

project-lvl1-s18 is my second training project to train me as Back-end JavaScript programmer in Hexlet educational centre (https://ru.hexlet.io/pages/about)

Build Status

Code Climate Test Coverage Issue Count

Project contains calculator of differences between configuration files ( available formats json, ymal, ini).

install

$ sudo npm install -g project-lvl2-s18

usage

gendiff options first_config second_config

help

gendiff --help

currently available three output formats (default, plain, json)

default format

gendiff first_config second_config

result will be like

{
    host: hexlet.io
  + timeout: 20
  - timeout: 50
  - proxy: 123.234.53.22
  + verbose: true
}

plain format

gendiff -f plain first_config second_config

result will be like

Property 'common.setting2' was removed
Property 'common.setting6' was removed
Property 'common.setting4' was added with value: blah blah
Property 'common.setting5' was added with complex value
Property 'group1.baz' was updated. From 'bas' to 'bars'
Property 'group2' was removed
Property 'group3' was added with complex value

json format

gendiff -f json first_config second_config

result will be like

[
  {
    "status": "unchanged",
    "key": "host",
    "newValue": null,
    "oldValue": "hexlet.io",
    "children": []
  },
  {
    "status": "updated",
    "key": "timeout",
    "newValue": "20",
    "oldValue": "50",
    "children": []
  },
  {
    "status": "removed",
    "key": "proxy",
    "newValue": null,
    "oldValue": "123.234.53.22",
    "children": []
  },
  {
    "status": "added",
    "key": "verbose",
    "newValue": true,
    "oldValue": null,
    "children": []
  }
]
1.0.1

7 years ago

0.7.0

7 years ago

0.4.3

7 years ago

0.4.2

7 years ago

0.2.11

7 years ago

0.2.10

7 years ago

0.2.8

7 years ago

0.2.7

7 years ago

0.2.6

7 years ago

0.2.5

7 years ago

0.2.4

7 years ago

0.2.3

7 years ago

0.2.2

7 years ago

0.2.0

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago

0.0.1

7 years ago