Open hungriesthippo opened 3 years ago
Hey @hungriesthippo,
I just had a call with @aidam38 and we agreed that I would do a minimally-intrusive refactoring/preparing for the script to be able to be unit-tested so we can make future changes with more confidence. A more functional style is a huge part of that and I plan to extract some pure functions as a first step (+ add npm).
https://github.com/LuccaHellriegel/roamsr/tree/refactoring-for-unit-tests
Maybe we can integrate your ideas after I have put some unit-tests into place so we can be sure that it generally still works? Happy to chat about possible refactorings.
Just want to say this is not a criticism of the code! It's not unmanageable. Mostly I think it's a fun example for a more functional/reactive style.
First: defining the state
a sketch of the main loop
Let me know what you think. My customization stuff coming soon may help motivate the changes.