{"ScriptPreparationCode":"var isObject = (v) =\u003E typeof v === \u0027object\u0027;\r\nvar pathOr = (pathToProp, object) =\u003E {\r\n if (object == null) {\r\n return undefined;\r\n }\r\n let currentObject = object;\r\n for (const key of pathToProp) {\r\n if (currentObject == null || !isObject(currentObject)) {\r\n return defaultValue;\r\n }\r\n\r\n currentObject = currentObject[key];\r\n }\r\n \r\n if (currentObject == null) {\r\n return undefined;\r\n }\r\n return currentObject;\r\n}","TestCases":[{"Name":"pathOr","Code":"pathOr([\u0027foo\u0027], { foo: \u0027bar\u0027 });\r\npathOr([\u0027baz\u0027], { foo: \u0027bar\u0027 });","IsDeferred":false},{"Name":"direct","Code":"({ foo: \u0027bar\u0027 }).foo;\r\n({ foo: \u0027bar\u0027 }).baz;","IsDeferred":false}]}