{"ScriptPreparationCode":null,"TestCases":[{"Name":"with regex","Code":"function getBundleId(definitionName) {\r\n const matches = definitionName.match(/(.\u002B):/);\r\n\r\n return (matches \u0026\u0026 matches.pop()) || \u0027\u0027;\r\n}\r\n\r\nconst res = getBundleId(\u0027foo:bar:baz\u0027);","IsDeferred":false},{"Name":"with split","Code":"function getBundleId(definitionName) {\r\n const lastIndex = definitionName.lastIndexOf(\u0027:\u0027);\r\n return lastIndex !== -1 ? definitionName.slice(0, lastIndex) : \u0027\u0027;\r\n}\r\n\r\nconst res = getBundleId(\u0027foo:bar:baz\u0027);","IsDeferred":false}]}