-
Notifications
You must be signed in to change notification settings - Fork 13
How to return just the changed properties #3
Comments
Unfortunately no at the moment. You are welcome to do a PR if you would like Thanks & Regards, On Wed, Jul 20, 2016 at 4:46 AM, edbentinck [email protected]
|
Ok. I can do that. That said, I feel that the current method names will be a little confusing if I add this functionality. I understand that you based this package on another implementation and therefore you have essentially just followed their naming conventions, which makes sense. However, other diff packages use different terminology – for instance this very popular diff package – and personally I find them to be a bit more straight-forward. In the example above they describe the term "diff" as being the result of the difference between the two objects, not the comparison itself. So, if I were to add the proposed functionality I would probably favour amending the current method names to something along these lines:
I would name the new function something like the following. This function would return an object rather than the JSON.
Since you're the owner of this package I think it should be your call on the terminology used, but those are some of my thoughts before I start moving things around in your project 😛 Let me know what you think and I'll submit the PR. Any other suggestions for terminology are appreciated. |
You can propose to change the method names, i can make a major release if Thanks & regards,
|
Hi, is there a method which just returns only the changed properties? This would be essentially the result of
toJsonDiffView
, but without the comparisons. As an example, in the case of your demo this would result in:Changed properties:
The text was updated successfully, but these errors were encountered: