1.0.1 • Published 5 years ago

project2-snokke v1.0.1

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

Difference calculator

Maintainability Test Coverage Build Status

Install

npm install -g project2-snokke

Description

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

Compares two configuration files and shows a difference.

Options:
  -V, --version        output the version number
  -f, --format [type]  output format: pretty, plain, json (default: "pretty")
  -h, --help           output usage information

Supported file formats: json, yaml, ini

Supported output formats: pretty, flat, json

Demo

Pretty format (Asciinema):

bash-3.2$ gendiff before.json after.json     
{                                                                                 
    common: {                                                                     
        setting1: Value 1                                                         
      - setting2: 200                                                             
      + setting3: {                                                               
            key: value                                                            
        }                                                                         
      - setting3: true                                                            
        setting6: {                                                               
            key: value                                                            
          + ops: vops                                                             
        }                                                                         
      + follow: false                                                             
      + setting4: blah blah                                                       
      + setting5: {                                                               
            key5: value5                                                          
        }                                                                         
    }                                                                             
    group1: {                                                                     
      + baz: bars                                                                 
      - baz: bas                                                                  
        foo: bar                                                                  
      + nest: str                                                                 
      - nest: {                                                                   
            key: value                                                            
        }                                                                         
    }                                                                             
  - group2: {                                                                     
        abc: 12345                                                                
    }                                                                             
  + group3: {                                                                     
        fee: 100500                                                               
    }                                                                             
}  

Flat format (Asciinema):

bash-3.2$ gendiff --format plain before.json after.json                           
Property 'common.setting2' was removed                                            
Property 'common.setting3' was updated. From true to [complex value]              
Property 'common.setting6.ops' was added with value: 'vops'                       
Property 'common.follow' was added with value: false                              
Property 'common.setting4' was added with value: 'blah blah'                      
Property 'common.setting5' was added with value: [complex value]                  
Property 'group1.baz' was updated. From 'bas' to 'bars'                           
Property 'group1.nest' was updated. From [complex value] to 'str'                 
Property 'group2' was removed                                                     
Property 'group3' was added with value: [complex value]              
1.0.1

5 years ago

1.0.0

6 years ago

0.3.5

6 years ago

0.3.4

6 years ago

0.3.3

6 years ago

0.3.2

6 years ago

0.3.1

6 years ago

0.3.0

6 years ago

0.2.14

6 years ago

0.2.13

6 years ago

0.2.12

6 years ago

0.2.11

6 years ago

0.2.10

6 years ago

0.2.9

6 years ago

0.2.8

6 years ago

0.2.7

6 years ago

0.2.6

6 years ago

0.2.5

6 years ago

0.2.4

6 years ago

0.2.3

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.12

6 years ago

0.1.11

6 years ago

0.1.10

6 years ago

0.1.9

6 years ago

0.1.8

6 years ago

0.1.7

6 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago