Out of curiosity, when I extract an object from SharedArray described in the example I am not able to modify the object itself. Is the object I assume readonly or frozen?
IE: if I do something like:
const data = loadData("/resources/api/foo/bar.json");
I cannot modify data[0].whatever (a property in the .json object). FWIW loadData is just a function that does:
export function loadData(dataFile) {
const data = new SharedArray('dataFile', function () {
const obj = JSON.parse(open(dataFile));
return obj;
})
return data
}
Am I correct in assuming the referenced object that sharedArray returns is NOT writable? I assume I can get around this via Object.assign to a new object. But I wanted to just get a verification.
Thanks!