Most existing solutions return a confusing diff format that often requires extra parsing. They are also limited to object comparison. Superdiff provid

Search code, repositories, users, issues, pull requests...

submited by
Style Pass
2024-10-12 11:00:04

Most existing solutions return a confusing diff format that often requires extra parsing. They are also limited to object comparison.

Superdiff provides a complete and readable diff for both arrays and objects. Plus, it's battle-tested, has zero dependencies, and is super fast.

Compares two objects and returns a diff for each value and its possible subvalues. Supports deeply nested objects of any value type.

ignoreArrayOrder: if set to true, ["hello", "world"] and ["world", "hello"] will be treated as equal, because the two arrays contain the same values, just in a different order.

The objects diff are grouped into arrays - called chunks - and are consumed thanks to an event listener. You have access to 3 events:

If you or your company uses Superdiff, please show your support by becoming a sponsor! Your name and company logo will be displayed on the README.md. Premium support is also available. https://github.com/sponsors/DoneDeal0

Leave a Comment