Performs a deep copy using the native structuredClone (if available), falling back to a cleanify JSON strategy otherwise.
structuredClone
cleanify
The object to clone
Optional
Optional structuredClone transfer options
A deep copy of the object
const copy = clone(original); Copy
const copy = clone(original);
Performs a deep copy using the native
structuredClone(if available), falling back to acleanifyJSON strategy otherwise.