A fast, zero dependency object and array comparison library. Significantly faster than most other deep comparison libraries and has full TypeScript support.
Full Changelog: https://github.com/AsyncBanana/microdiff/compare/v1.3.2...v1.4.0
Full Changelog: https://github.com/AsyncBanana/microdiff/compare/v1.3.1...v1.3.2
Full Changelog: https://github.com/AsyncBanana/microdiff/compare/v1.3.0...v1.3.1
Full Changelog: https://github.com/AsyncBanana/microdiff/compare/v1.2.0...v1.3.0
This release adds a few things:
diff(obj1,obj2,{cyclesFix: false})
This release fixes an array nesting bug caused by v1.1.2 that caused problems if you nested an object inside an array inside an object (#11).
This release fixes cyclical references causing Microdiff to infinitely recurse (#6). This also adds better support for loading the ESM version in package.json. Thanks for 600 stars!
This release is just a small bug fix that fixes #7 and allows replacing an object with null or a primitive value.
This release adds support for CommonJS usage in Node. Current ESM usage should be unaffected, but people using CommonJS should now be able to require()
Microdiff.
This release uses prototype checking, number coercion, and string coercion to support diffing non-primitive types. The new design also makes it much easier to add support for new types without a significant increase in size, as this is designed in a more modular way than earlier designs like v1.0.1's dates. In fact, Dates now use this design.
new String()
is now supportednew Number()
is now supportednew RegExp()
and Regex literals are now supportedThis release only adds 113 bytes of Terser compressed JavaScript (even less with Gzip or Brotli) and does not affect performance. Thanks for all of your support!