Open mjstahl opened 5 years ago
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
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.