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

Pre post cleanup callbacks #22

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

chr15m
Copy link

@chr15m chr15m commented Oct 28, 2022

Hi Alan,

Thanks very much for storage-atom, I have used it a whole bunch in the last few years.

This patch adds two optional callback functions pre-clean-fn and post-clean-fn. These callbacks allow the user to clean the value before it is written to storage and on the way out after it is read from storage. The first callback takes the value and the second one takes the outgoing value and it's previous value (if any). If there is anything you want me to do or if I can improve this patch in any way do let me know.

PS I was not able to run the tests using boot test-cljs as an error occurred: java.lang.ClassNotFoundException: javax.xml.bind.DatatypeConverter, compiling:(cljs/closure.clj:1:1)

Fixes #20.

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

Successfully merging this pull request may close these issues.

Only persist certain keys
1 participant