3 ms·
Exactly this. It was a joy reading this article because it shows how deep the rabbit hole goes - but in 99% of cases I would still choose cloneJSON, because a)
by bornfreddy 4y ago
Exactly this. It was a joy reading this article because it shows how deep the rabbit hole goes - but in 99% of cases I would still choose cloneJSON, because a) no external dependency, b) I (think I) know what it does and c) I don't care about anything that is not data and I don't care about BigInt and Symbol.
There is a reason none of the libraries tested got it "right" - nobody needs it. Or if they do, they just write their own implementation.