{"ScriptPreparationCode":null,"TestCases":[{"Name":"switch/case","Code":"const elementAction = {\r\n a: 1,\r\n b: 2,\r\n c: 3,\r\n};\r\n\r\nfunction func() {\r\n switch (true) {\r\n case Object.hasOwn(elementAction, \u0027foo\u0027):\r\n return false;\r\n case Object.hasOwn(elementAction, \u0027bar\u0027):\r\n return false;\r\n case Object.hasOwn(elementAction, \u0027baz\u0027):\r\n return false;\r\n case Object.hasOwn(elementAction, \u0027bazz\u0027):\r\n return false;\r\n case Object.hasOwn(elementAction, \u0027fooz\u0027):\r\n return false;\r\n case Object.hasOwn(elementAction, \u0027foob\u0027):\r\n return false;\r\n case Object.hasOwn(elementAction, \u0027doob\u0027):\r\n return false;\r\n case Object.hasOwn(elementAction, \u0027bafz\u0027):\r\n return false;\r\n case Object.hasOwn(elementAction, \u0027barz\u0027):\r\n return false;\r\n case Object.hasOwn(elementAction, \u0027gas\u0027):\r\n return false;\r\n case Object.hasOwn(elementAction, \u0027gaz\u0027):\r\n return false;\r\n case Object.hasOwn(elementAction, \u0027daz\u0027):\r\n return false;\r\n case Object.hasOwn(elementAction, \u0027dar\u0027):\r\n return false;\r\n case Object.hasOwn(elementAction, \u0027har\u0027):\r\n return false;\r\n case Object.hasOwn(elementAction, \u0027ooph\u0027):\r\n return false;\r\n case Object.hasOwn(elementAction, \u0027phooph\u0027):\r\n return false;\r\n default:\r\n return true;\r\n }\r\n}\r\n\r\nfunc();","IsDeferred":false},{"Name":"Dictionary","Code":"const elementAction = {\r\n a: 1,\r\n b: 2,\r\n c: 3,\r\n};\r\n\r\nconst dictionary = [\r\n {\r\n key: \u0027foo\u0027,\r\n value: () =\u003E false,\r\n },\r\n {\r\n key: \u0027bar\u0027,\r\n value: () =\u003E false,\r\n },\r\n {\r\n key: \u0027baz\u0027,\r\n value: () =\u003E false,\r\n },\r\n {\r\n key: \u0027bazz\u0027,\r\n value: false,\r\n },\r\n {\r\n key: \u0027fooz\u0027,\r\n value: false,\r\n },\r\n {\r\n key: \u0027doob\u0027,\r\n value: false,\r\n },\r\n {\r\n key: \u0027bafz\u0027,\r\n value: false,\r\n },\r\n {\r\n key: \u0027barz\u0027,\r\n value: false,\r\n },\r\n {\r\n key: \u0027gas\u0027,\r\n value: false,\r\n },\r\n {\r\n key: \u0027gaz\u0027,\r\n value: false,\r\n },\r\n {\r\n key: \u0027daz\u0027,\r\n value: false,\r\n },\r\n {\r\n key: \u0027dar\u0027,\r\n value: false,\r\n },\r\n {\r\n key: \u0027har\u0027,\r\n value: false,\r\n },\r\n {\r\n key: \u0027ooph\u0027,\r\n value: false,\r\n },\r\n {\r\n key: \u0027phooph\u0027,\r\n value: false,\r\n },\r\n {\r\n key: \u0027foo\u0027,\r\n value: false,\r\n },\r\n];\r\n\r\nfunction func() {\r\n const index = dictionary.indexOf(({ key }) =\u003E Object.hasOwn(elementAction, key));\r\n return index \u003E -1 ? dictionary[index].value : true;\r\n}\r\n\r\nfunc();","IsDeferred":false}]}