{"ScriptPreparationCode":"function single(url) {\r\n var out = {};\r\n var protocol = url.match(/^[^:]\u002B/)[0];\r\n var domain = url.match(/(?:\\/{2})([^/]\u002B)/)[1];\r\n var paths = url.match(/(?:\\/{2}[^\\/]\u002B\\/)([^?]\u002B)/)[1].split(\u0027/\u0027);\r\n var query = url.match(/(?:[?])([^#]\u002B)/)[1].split(/\u0026/g).reduce((result, next) =\u003E {\r\n var [key, value] = next.split(/=/);\r\n result[key] = value || \u0027\u0027;\r\n return result;\r\n }, {});\r\n \r\n var hash = url.match(/(?:[#])([\\S\\s]\u002B)/)[1].split(/\u0026/g).reduce((result, next) =\u003E {\r\n var [key, value] = next.split(/=/);\r\n result[key] = value || \u0027\u0027;\r\n return result;\r\n }, {});\r\n \r\n out.protocol = protocol;\r\n out.domain = domain;\r\n out.paths = paths;\r\n out.query = query;\r\n out.hash = hash;\r\n return out;\r\n }\r\n \r\n function multi(url) {\r\n var out = {\r\n protocol: getProtocol(url),\r\n domain: getDomain(url),\r\n paths: getPaths(url),\r\n query: getQuery(url),\r\n hash: getHash(url),\r\n };\r\n return out;\r\n }\r\n \r\n function getProtocol(url) {\r\n return url.match(/^[^:]\u002B/)[0];\r\n }\r\n \r\n function getDomain(url) {\r\n return url.match(/(?:\\/{2})([^/]\u002B)/)[1];\r\n }\r\n \r\n function getPaths(url) {\r\n return url.match(/(?:\\/{2}[^\\/]\u002B\\/)([^?]\u002B)/)[1].split(\u0027/\u0027);\r\n }\r\n \r\n function getQuery(url) {\r\n return url.match(/(?:[?])([^#]\u002B)/)[1].split(/\u0026/g).reduce((result, next) =\u003E {\r\n var [key, value] = next.split(/=/);\r\n result[key] = value || \u0027\u0027;\r\n return result;\r\n }, {});\r\n }\r\n \r\n function getHash(url) {\r\n return url.match(/(?:[#])([\\S\\s]\u002B)/)[1].split(/\u0026/g).reduce((result, next) =\u003E {\r\n var [key, value] = next.split(/=/);\r\n result[key] = value || \u0027\u0027;\r\n return result;\r\n }, {});\r\n }","TestCases":[{"Name":"Single","Code":"single(\u0027http://preview.sub.domain.org.com/path1/path2/?a=1\u0026b2#c=3\u0026d=4\u0027)\r\n","IsDeferred":false},{"Name":"Multi","Code":"multi(\u0027http://preview.sub.domain.org.com/path1/path2/?a=1\u0026b2#c=3\u0026d=4\u0027)\r\n","IsDeferred":false}]}