{"ScriptPreparationCode":"var roles = [\u0027owner\u0027, \u0027writer\u0027, \u0027reader\u0027, \u0027freeBusyReader\u0027];\r\nvar roleSet = new Set(roles);\r\n\r\n\r\nfunction isRoleA(str) {\r\n return roles.includes(str);\r\n}\r\n\r\nfunction isRoleS(str) {\r\n return roleSet.has(str);\r\n}\r\n\r\nfunction isRoleSw(str) {\r\n switch (str) {\r\n case \u0027owner\u0027:\r\n case \u0027writer\u0027:\r\n case \u0027reader\u0027:\r\n case \u0027freeBusyReader\u0027:\r\n return true;\r\n default:\r\n return false;\r\n };\r\n}\r\n\r\n\r\nvar testees = [\u0027owner\u0027, \u0027writer\u0027, \u0027reader\u0027, \u0027freeBusyReader\u0027, \u0027ower\u0027, \u0027wrer\u0027, \u0027reer\u0027, \u0027freeBueader\u0027, null, undefined, 5, \u0027ownea\u0027, \u0027writea\u0027, \u0027aaaaaa\u0027, \u0027freeBusyReadea\u0027, \u0027ownea\u0027, \u0027writea\u0027, \u0027readea\u0027, \u0027freeBusyReadea\u0027]\r\n","TestCases":[{"Name":"Array.includes","Code":"const rA = testees.map(s =\u003E isRoleA(s));\r\n\r\n","IsDeferred":false},{"Name":"Set.has","Code":"const rS = testees.map(s =\u003E isRoleS(s));\r\n","IsDeferred":false},{"Name":"switch","Code":"const rSw = testees.map(s =\u003E isRoleSw(s));","IsDeferred":false}]}