4 ms·
> I don't think there is a native immmutable array in javascript. I'm here to tell you that `Object.freeze()` works just fine on arrays.
by recursive 6y ago
> I don't think there is a native immmutable array in javascript.
I'm here to tell you that `Object.freeze()` works just fine on arrays.
- resonantjacket5 6y agoNice. Though I don't think that solves the rest of the issues I outlined sadly. I guess you could have this json+ convert into some custom javascript class that allows arrays/objects as map keys rather than the normal javascript object that only accepts strings as map keys.
- chrisseaton 6y ago> I guess you could have this json+ convert into some custom javascript class that allows arrays/objects as map keys rather than the normal javascript object that only accepts strings as map keys. Sure - why not? JSON doesn't have to map directly to JavaScript objects.