If you want to deep clone a value in Node.js, you no longer need to use a library or the JSON.parse(JSON.stringify(value)) hack. You can use the new global function structuredClone()
const user = {
name: "JS Snippets",
address: { street: "Original Road", city: "Placeshire" },
};
const clonedUser = structuredClone(user);
clonedUser.address.street = "New Road";
console.log("user.address.street:", user.address.street);
// > Original Road
console.log("clonedUser.address.street:", clonedUser.address.street);
// > New Road
Source
https://github.com/roeib/JavaScript-snippets#structuredclone