microdiff

A fast, zero dependency object and array comparison library. Significantly faster than most other deep comparison libraries and has full TypeScript support.

MIT License

Downloads
571.7K
Stars
3.5K
Committers
8

Bot releases are visible (Hide)

microdiff - v1.4.0 - Bug fixes and consistency improvements Latest Release

Published by AsyncBanana 7 months ago

What's Changed

  • add support for treating NaN values as equivalent by @brainthinks in #24, closes #23
  • fixed diffs for properties changed from arrays to objects, closes #38

New Contributors

Full Changelog: https://github.com/AsyncBanana/microdiff/compare/v1.3.2...v1.4.0

microdiff - TypeScript improvements, bugfixes, and testing improvements

Published by AsyncBanana over 1 year ago

What's Changed

New Contributors

Full Changelog: https://github.com/AsyncBanana/microdiff/compare/v1.3.1...v1.3.2

microdiff - Optimizations, TypeScript improvements, and README updates

Published by AsyncBanana about 2 years ago

What's Changed

New Contributors

Full Changelog: https://github.com/AsyncBanana/microdiff/compare/v1.3.0...v1.3.1

microdiff - Added old value to CHANGE and REMOVE (#17) + Performance optimization (#14)

Published by AsyncBanana almost 3 years ago

What's Changed

New Contributors

Full Changelog: https://github.com/AsyncBanana/microdiff/compare/v1.2.0...v1.3.0

microdiff - Improved performance; Added cycles option; Added number paths for arrays

Published by AsyncBanana almost 3 years ago

This release adds a few things:

  • Performance has been improved somewhat through a few different strategies (credits to @brecert and their fork for some ideas)
  • An option has been added to disable cycle checking to optimize if you know there are no cycles (#9):
diff(obj1,obj2,{cyclesFix: false})
  • Now, array paths will have numbers instead of strings (#12).
microdiff - Fixed array nesting bug

Published by AsyncBanana almost 3 years ago

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).

microdiff - Fixed cyclical references (#6)

Published by AsyncBanana almost 3 years ago

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!

microdiff - Fixed replacing object with null

Published by AsyncBanana almost 3 years ago

This release is just a small bug fix that fixes #7 and allows replacing an object with null or a primitive value.

microdiff - Added support for CommonJS

Published by AsyncBanana almost 3 years ago

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.

microdiff - Added support for additional non-primitive types

Published by AsyncBanana almost 3 years ago

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 supported
  • new Number() is now supported
  • new RegExp() and Regex literals are now supported

This 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!

microdiff - Initial GitHub Release

Published by AsyncBanana almost 3 years ago

Initial release of Microdiff for GitHub Releases.