microdiff icon indicating copy to clipboard operation
microdiff copied to clipboard

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

Results 9 microdiff issues
Sort by recently updated
recently updated
newest added

Hey! I'm currently considering to use microdiff for my project, however I also have to be able to recreate an object from the diff and the source object (basically so...

http://jsonpatch.com/ as the format is "standard" and is widely supported on backend stacks

Currently, `NaN` values always result in `CHANGE`, even though nothing changed. Technically in JS, `NaN !== NaN`, so I understand that there is an argument for this behavior. However, I...

``` const diff = require('microdiff').default const a1 = {"a": { "b": 1 }} const a2 = {"a": null} console.log(diff(a1, a2)) ``` ``` /Users/.../node_modules/microdiff/dist/index.cjs:8 if (!(key in newObj)) { ^ TypeError:...

#### Issue Summary: The `diff` function exhibits inconsistent behavior when comparing changes between properties of different Object-derived types such as Array, Set, Map, etc. It appears to misidentify certain type...

bug

**❗ Is your feature request related to a problem? Please describe.** We use started using `microdiff` as a pre-step before doing db updates. When working with [MongoDB](https://www.mongodb.com/), then use the...

enhancement

Implemented type guards to improve readability and type safety in the `diff` function. Specifically, added helper functions `isObject`, `isArray`, and `isRichType` to encapsulate type checks. It pretty much fixes redundancy...

Add new 'shallow' option to diff function that performs shallow comparison by only comparing primitive values at the first level and ignoring nested objects and arrays. This is useful when...