-
Notifications
You must be signed in to change notification settings - Fork 490
Closed
Description
I have a project where a few functions have been added to Array.prototype
. When I have two objects that I want to run a diff against, jsondiffpatch returns me the array with a couple of NaN
keys added to the bottom, without any values. The amount of NaN
s is equal to the amount of functions which were added to the prototype.
I made a sample JSFiddle which can be viewed here.
I would suggest that these items do not show up in the diff, as these functions are not part of the array but instead of its prototype. I believe that using array.hasOwnProperty(key)
could be used to exclude prototype extensions, but I'm still trying to figure out how array diffing works internally.
Metadata
Metadata
Assignees
Labels
No labels