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
- Host: GitHub
- URL: https://github.com/developit/json-numeric-diff
- Owner: developit
- Created: 2016-01-19T20:08:24.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2017-05-09T14:54:58.000Z (over 8 years ago)
- Last Synced: 2025-09-12T00:45:38.407Z (4 months ago)
- Language: JavaScript
- Homepage: http://npm.im/json-numeric-diff
- Size: 2.93 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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