{"ScriptPreparationCode":"var fullAppName = \u0027vendor.appname@10.9.8\u0027\r\n\r\n\r\nfunction eatUntil(stopChar, str) {\r\n let result = \u0027\u0027\r\n for (let i = 0, len = str.length; i \u003C len; i\u002B\u002B) {\r\n if (str[i] === stopChar) break\r\n result \u002B= str[i]\r\n }\r\n return [result, str.slice(result.length \u002B 1)]\r\n}","TestCases":[{"Name":"regexp","Code":" const splitAppName = /[^@.]\u002B/g\r\n const [vendor] = splitAppName.exec(fullAppName) || [null]\r\n const [name] = splitAppName.exec(fullAppName) || [null]\r\n const [major] = splitAppName.exec(fullAppName) || [null]","IsDeferred":false},{"Name":"split","Code":" const [fullName, version] = fullAppName.split(\u0027@\u0027, 2)\r\n const [major] = version.split(\u0027.\u0027, 1)\r\n const [vendor, name] = fullName.split(\u0027.\u0027, 2)","IsDeferred":false},{"Name":"manual method","Code":"const [appName, version] = eatUntil(\u0027@\u0027, fullAppName);\r\nconst [vendor, name] = eatUntil(\u0027.\u0027, appName);\r\nconst [major] = eatUntil(\u0027.\u0027, version);","IsDeferred":false}]}