Repository navigation
v0.1.0
v0.1.0 — CLI Support
What's New
CLI for comparing JSON objects and files — deep-obj-diff now ships with a command-line interface. Compare JSON files or inline strings directly from your terminal.
# Compare two JSON files
deep-obj-diff old.json new.json
# Compare inline JSON
deep-obj-diff '{"a":1,"b":2}' '{"a":1,"b":3,"c":4}'
# Use any output format
deep-obj-diff old.json new.json --format patchCLI Features
- Dual input modes — pass file paths or inline JSON strings
- All output formats —
list(default),flat,nested,patch,json - Rich options —
--include-unchanged,--max-depth,--no-array-order,--filter,--json - Colorized output — respects
NO_COLORandFORCE_COLORenvironment variables - CI-friendly — exits with code
1when differences are found,0when identical
Other Changes
- Fixed
npm testscript for Windows compatibility - Restructured CLI into modular
src/cli/folder (types, colors, input, printers, command) - Added 19 CLI integration tests (105 total, all passing)
- Updated README with full CLI documentation
Install
npm install -g deep-obj-diff