Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add user-defined hooks into the deepClone function #281

Open
udbhav-s opened this issue Sep 1, 2021 · 0 comments
Open

Add user-defined hooks into the deepClone function #281

udbhav-s opened this issue Sep 1, 2021 · 0 comments

Comments

@udbhav-s
Copy link

udbhav-s commented Sep 1, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant