Closed colestrode closed 8 years ago
BTW, this logic should also go in the all other data stores and the memory store that comes with botkit. In general you want to have an abstraction at the type level instead that copied and pasted code for 3 times for each. Keep it DRY
Good point @ChrisCinelli, though I think the idea is to just leave the file store in botkit and pull everything out as modules. I'm not sure when they're planning on doing that. Maybe I'll make a PR to clean all that up.
@anonrig Since you merged #3, do you want to review and merge or close this PR before bumping the NPM version?
Nice PR. :+1:
I simplified the main library and some of the unit tests. I removed duplicate code and extracted the storage object creation into a function.
Note that even though I updated some unit tests, they all passed after the refactoring.