structuredClone() is the native JavaScript API for deep copying objects. It handles Date, Map, Set, circular references, and more — replacing the JSON hack forever.
structuredClone() is the native JavaScript API for deep copying objects. It handles Date, Map, Set, circular references, and more — replacing the JSON hack forever.