Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Immutable JavaScript data structures, backwards-compatible with arrays, objects. Parent comment
https://gist.github.com/vjeux/6b390e6a6bb51e24b646
__DEV__ = true; var array = ['a', 'b', 'c'] deepFreezeAndThrowOnMutationInDev(array) array[0] = 10; Error: You attempted to set the key `0` with the value `10` on an object that is meant to be immutable and has been frozen.
There are no comments on this comment yet.
https://gist.github.com/vjeux/6b390e6a6bb51e24b646