{"ScriptPreparationCode":"var arr = [{\r\n type: \u0027This Thing\u0027\r\n}, {\r\n type: \u0027Something Else\u0027\r\n}];\r\nvar arr2 = [{\r\n type: \u0027SomethingElse\u0027\r\n}, {\r\n type: \u0027Something Else\u0027\r\n}]\r\n\r\nfunction _find(items) {\r\n let hasThisThing = false;\r\n let hasSomethingElse = false;\r\n\r\n return arr.find(item =\u003E {\r\n const isThisThing = item.type === \u0027This Thing\u0027;\r\n hasThisThing = hasThisThing || isThisThing;\r\n hasSomethingElse = hasSomethingElse || !isThisThing;\r\n\r\n return hasThisThing \u0026\u0026 hasSomethingElse;\r\n });\r\n}\r\n\r\nfunction _some(items) {\r\n let hasThisThing = arr.some(item =\u003E item.type === \u0027This Thing\u0027);\r\n \tlet hasSomethingElse;\r\n if (hasThisThing) {\r\n hasSomethingElse = arr.some(item =\u003E item.type !== \u0027This Thing\u0027);\r\n }\r\n\r\n return hasThisThing \u0026\u0026 hasSomethingElse;\r\n}","TestCases":[{"Name":"Find1","Code":"_find(arr)","IsDeferred":false},{"Name":"Find2","Code":"_find(arr2)","IsDeferred":false},{"Name":"Some1","Code":"_some(arr)","IsDeferred":false},{"Name":"Some2","Code":"_some(arr2)","IsDeferred":false}]}