deep-object-diff icon indicating copy to clipboard operation
deep-object-diff copied to clipboard

Allow some degree of configuration

Open FZ-Iskandar opened this issue 2 years ago • 1 comments

It would be great if you could give a third parameter to the methods with a few configuration options, like for example:

  • comparing operator: Strict (===) or Loose(==). And set the default to strict to not break backwards compatibility
  • determining null/empty: For example a null value recovered from the DB could be considered "the same" as an empty string comming from a text input.

Just some ideas of configurations that could be set

FZ-Iskandar avatar May 08 '23 13:05 FZ-Iskandar

I ran into a case recently where I was diffing some objects that contained arrays, and I didn't care about the ordering of the arrays. Being able to specify this as a config option would be nice (currently defaults to returning a diff entry.)

ioev avatar May 10 '23 20:05 ioev