mjstahl/stated

reset() does not reset values, only state

Opened this issue · 1 comments

reset needs to reset the entire state machine to how it was when instantiated. Maybe right now, we just save a copy to be used when resetting.

This is going to be more difficult than previously imagined. Most cloning techniques (using Object.assign for example) are only shall clones.

We need a deep clone that can handle functions (JSON (de)serialization is out). And importing ONLY the lodash.clonedeep increases this package to over 3K