Re:Deep Cloning Objects in JavaScript, the Modern Way
by lambda_garden on Friday December 22, 2023 @07:49AM
(#38733614)
In practice, I think it's easier to use linting and type-systems to prevent other code from mutating you stuff than defensive copying.
Maybe it's not a situation that comes up often, but it would be fairly hard to debug and guarding yourself against mysterious problems in advance is always neat.