An open API service indexing awesome lists of open source software.

https://github.com/developit/json-numeric-diff

Shows the difference between numeric values in two objects
https://github.com/developit/json-numeric-diff

Last synced: 4 months ago
JSON representation

Shows the difference between numeric values in two objects

Awesome Lists containing this project

README

          

# `json-numeric-diff`

> A very simple CLI + module that shows the difference between numeric values in two objects.

### Options

* `--invert` - green for decreased values, red for increased
* `--format` - how to show changed values: `ratio`, `percent`, `delta`, or `difference`
* `--percent` - shortcut for `--format percent`
* `--colors` - termcolors for increase and decrease. Default: `green,red`

### Example

```sh
json-numeric-diff test/one.json test/two.json --invert --format percent

{
"a": "-50.00%",
"b": "Infinity",
"c": "99.90%",
"d": "Infinity"
}
```

### License

MIT