cujojs / jiff

JSON Patch and diff based on rfc6902
Other
627 stars 41 forks source link

Add missing hash call in diff calculation #49

Open hollandjake opened 2 months ago

hollandjake commented 2 months ago

Currently jiff.diff(), despite taking the hash function as an argument, does not call it.

Fixing this enables the user to supply a custom hash function enabling unified behaviour across all jiff functions.

Tests updated reflect this with a basic example (only compare the type of the field rather than its value). If you wish for another example let me know, happy to create