I'm using fast-json-patch with an object where I need to remove some private properties on the server before generating the patch and sending it to the client - adding a hook for the clone function would allow people to transform the object before patches are generated, which would remove the need for redundantly deep cloning the object and then passing it into jsonpatch. Users could also use this hook to handle edge cases like Dates and other objects which cannot be directly converted into JSON.
I'm using fast-json-patch with an object where I need to remove some private properties on the server before generating the patch and sending it to the client - adding a hook for the clone function would allow people to transform the object before patches are generated, which would remove the need for redundantly deep cloning the object and then passing it into jsonpatch. Users could also use this hook to handle edge cases like Dates and other objects which cannot be directly converted into JSON.