Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jsdiffy

A tiny Node.js CLI that generates human-readable diffs between two JSON files. It normalizes output for IDs, URLs, and timestamps so review noise is reduced without changing the semantics of the diff.

About

jsdiffy is a lightweight diff tool for JSON files. Its default mode ignores noisy values such as auto-generated identifiers, absolute URLs, and ISO timestamps. You can also provide a custom ignore pattern with a JSON Pointer or a simple glob/regex-like token filter.

Features

  • Diff two JSON files recursively
  • Normalized mode: treat id, URL, and timestamp changes as non-diffs by default
  • Custom ignore tokens via CLI or .jsdiffyrc
  • Supports --text-patch output for quick console inspection
  • Written in plain Node.js with zero required external dependencies
  • Test suite included with 13 passing assertions

Installation

Clone the project or install it locally:

npm install

Usage

# diff two normalized JSON files
node src/index.js diff old.json new.json

# output text patch
node src/index.js diff old.json new.json --text-patch

# use custom ignore tokens
node src/index.js diff old.json new.json --ignore createdAt,updatedAt

# help
node src/index.js --help

Project structure

src/
  index.js
  diff.js
  normalize.js
  tokens.js
test/
  basic.test.js
examples/
  before.json
  after.json
.gitignore
LICENSE
package.json
README.md

License

MIT

About

Human-friendly JSON diff CLI with normalization for ids, URLs, and timestamps

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages