Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,6 @@ dist
.temp
.cache
.clinerules
.claude/
CLAUDE.md

# vitepress build output
**/.vitepress/dist
Expand Down Expand Up @@ -151,3 +149,5 @@ CLAUDE.md

# Ignore mcp test configuration files
.mcp.json
.DS_Store
.github/copilot-instructions.md
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
- **Advanced Diff Generation**: Uses the Levenshtein distance algorithm for meaningful diffs
- **Multiple Data Type Support**:
- Objects (including nested structures)
- Arrays (smart matching by content similarity)
- Arrays (positional comparison; no reordering/LCS)
- Strings (character-level differences)
- Numbers, Booleans, and any serializable value
- **Rich Output Options**:
Expand Down Expand Up @@ -61,6 +61,8 @@ console.log(diff({ foo: 'bar' }, { foo: 'baz' }));

Compare two values (strings, objects, arrays, etc.) and return a formatted diff string.

> **Note on arrays:** comparison is positional only (index-by-index). Reordered elements are treated as removals/additions rather than matched by similarity.

#### **Parameters**

- `a`, `b`: Anything serializable (object, array, string, number, etc.)
Expand Down
Loading