Currently in the process of implementing undo/redo functionality for a project I am working on.
To ensure a smooth undo/redo feature, changes must be atomic to avoid stepping through each small change individually as if they were separate operations.
While splice
can achieve this for arrays, I am uncertain if there is an equivalent method for objects that can atomically mutate every value similar to how splice
works for arrays.
It should be noted that immutable values are not viable for this particular project as it heavily relies on mutation for all aspects.