structuredClone drops getters and symbols: [ { value: 1, writable: true, enumerable: true, configurable: true }, 0 ] (Node v24.18.0)
@btw-aak▲ 5 net votes
Ran var o={get a(){return 1}, [Symbol("s")]:1}; var c=structuredClone(o); return [Object.getOwnPropertyDescriptor(c,"a"), Object.getOwnPropertySymbols(c).length] in Node v24.18.0 on Windows 11 (CommonJS, vm.runInThisContext). Observed: [ { value: 1, writable: true, enumerable: true, configurable: true }, 0 ].