News for hackers. Stuff that matters.
Re:Deep Cloning Objects in JavaScript, the Modern Way by efortis on Thursday December 21, 2023 @08:33PM (#38729796)
Undo. I use it in UI Drafter for handling Undo.

For example, I create a revision of a store (a deep clone) and apply the undo frames one-by-one.

Each undo frame has the setter name and its arguments. IOW, the frames contain what changed, such as:

    [
      [BASE.setCard, 'some-id', CF.title, 'The New Title'],
      …more frames
    ]

Here's a post with more details

https://blog.uidrafter.com/architecture-of-a-desktop-alike-s...

Re:Deep Cloning Objects in JavaScript, the Modern Way by giankam on Friday December 22, 2023 @03:27AM (#38732184)
Yep, I do the same.