{"ScriptPreparationCode":"function reach(obj, chain, options) {\r\n\r\n if (chain === false ||\r\n chain === null ||\r\n typeof chain === \u0027undefined\u0027) {\r\n\r\n return obj;\r\n }\r\n\r\n options = options || {};\r\n if (typeof options === \u0027string\u0027) {\r\n options = { separator: options };\r\n }\r\n\r\n const path = chain.split(options.separator || \u0027.\u0027);\r\n let ref = obj;\r\n for (let i = 0; i \u003C path.length; \u002B\u002Bi) {\r\n let key = path[i];\r\n if (key[0] === \u0027-\u0027 \u0026\u0026 Array.isArray(ref)) {\r\n key = key.slice(1, key.length);\r\n key = ref.length - key;\r\n }\r\n\r\n if (!ref ||\r\n !((typeof ref === \u0027object\u0027 || typeof ref === \u0027function\u0027) \u0026\u0026 key in ref) ||\r\n (typeof ref !== \u0027object\u0027 \u0026\u0026 options.functions === false)) { // Only object and function can have properties\r\n\r\n exports.assert(!options.strict || i \u002B 1 === path.length, \u0027Missing segment\u0027, key, \u0027in reach path \u0027, chain);\r\n exports.assert(typeof ref === \u0027object\u0027 || options.functions === true || typeof ref !== \u0027function\u0027, \u0027Invalid segment\u0027,\r\nkey, \u0027in reach path \u0027, chain);\r\n ref = options.default;\r\n break;\r\n }\r\n\r\n ref = ref[key];\r\n }\r\n\r\n return ref;\r\n}\r\n\r\nfunction reachTemplate(obj, template, options) {\r\n\r\n return template.replace(/{([^}]\u002B)}/g, ($0, chain) =\u003E {\r\n\r\n const value = reach(obj, chain, options);\r\n return (value === undefined || value === null ? \u0027\u0027 : value);\r\n });\r\n}\r\n\r\n_.templateSettings.interpolate = /{([^}]\u002B)}/g;\r\n\r\nvar str = \u0027jsdhifhsdl {name} jsdffsjlj sdf sdfsg{name}dsf gdsfds{name}fsdfdgsdfdf{name}dsgsdsds{name}dggsd gsdg{name} sdgsdgsd{name}g\u0027","TestCases":[{"Name":"hoek","Code":"reachTemplate({name: \u0027VADIM\u0027}, str)","IsDeferred":false},{"Name":"lodash","Code":"var compiled = _.template(str);\r\ncompiled({name: \u0027VADIM\u0027});","IsDeferred":false}]}