~I'd like to use structuredClone() to deep copy a JSON file. It is available since "@types/node": "17.0.29", where D2RMM 1.5.0 uses "@types/node": "17.0.5".~
~Here's the reason why:~
~I'm trying to change file A to be a (deep) copy of file B, then change some values for file A. Unfortunately if I read 2 files and use the spread operator (...), then use a single D2RMM.writeJson(), both files get copied over in the final result (the original but unchanged and the intended file with the intended changes).~
~Hey dude,~
~I'd like to use
structuredClone()
to deep copy a JSON file. It is available since"@types/node": "17.0.29"
, where D2RMM 1.5.0 uses"@types/node": "17.0.5"
.~~Here's the reason why:~ ~I'm trying to change file A to be a (deep) copy of file B, then change some values for file A. Unfortunately if I read 2 files and use the spread operator (
...
), then use a singleD2RMM.writeJson()
, both files get copied over in the final result (the original but unchanged and the intended file with the intended changes).~~Could you make this possible?~
EDIT: it seems my issue is caused by a bug in
D2RMM.readJson()
. See https://github.com/olegbl/d2rmm/issues/19.