Open ipip2005 opened 4 years ago
I realize this is old but in case someone stumbles this issue:
Your property filter would need to look like this.
propertyFilter: function (name, context) {
return typeof context.left[name] !== 'function' && typeof context.right[name] !== 'function'
}
context.left and context.right aren't the objects that are compared but rather their parents.
I understand that jsondiffpatch doesn't support diffing objects that have functions, I'm wondering if there is a way to simply ignore those functions instead of throwing error?
I tried using propertyFilter option like below but didn't help
Maybe we can filter the objects before calling diff but that extra CPU cost will be too much for us.
Any ideas? I'm open to raise a PR to that.