{"ScriptPreparationCode":"\r\n\r\nvar INITIAL_DATA = { items: {}, count: 0, keys: [] }\r\n\r\nfor (var index = 0; index \u003C 100; index\u002B\u002B) {\r\n INITIAL_DATA[index] = { id: index, name: \u0060ITEM-${index}\u0060, value: Math.random() }\r\n INITIAL_DATA.count\u002B\u002B\r\n INITIAL_DATA.keys.push(index)\r\n}\r\n\r\nvar NEW_ITEM_ID = INITIAL_DATA.count \u002B1\r\n\r\n\r\n\r\nvar im = immer;","TestCases":[{"Name":"immer no freeze","Code":"im.setAutoFreeze(false)\r\nvar produce = im.default\r\n\r\ndata = produce(INITIAL_DATA, draft =\u003E {\r\n draft.items[NEW_ITEM_ID] = { id: NEW_ITEM_ID, name: \u0027ITEM-NEW\u0027, value: 0 }\r\n draft.counter\u002B\u002B\r\n draft.keys.push(NEW_ITEM_ID)\r\n})","IsDeferred":false},{"Name":"immer freeze","Code":"im.setAutoFreeze(true)\r\nvar produce = im.default\r\n\r\ndata = produce(INITIAL_DATA, draft =\u003E {\r\n draft.items[NEW_ITEM_ID] = { id: NEW_ITEM_ID, name: \u0027ITEM-NEW\u0027, value: 0 }\r\n draft.counter\u002B\u002B\r\n draft.keys.push(NEW_ITEM_ID)\r\n})","IsDeferred":false}]}