{"ast":null,"code":"\"use strict\";\n\nexports.__esModule = true;\nexports.normalizeLocalePath = normalizeLocalePath;\n\nfunction normalizeLocalePath(pathname, locales) {\n  var detectedLocale; // first item will be empty string from splitting at first char\n\n  var pathnameParts = pathname.split('/');\n  (locales || []).some(function (locale) {\n    if (pathnameParts[1].toLowerCase() === locale.toLowerCase()) {\n      detectedLocale = locale;\n      pathnameParts.splice(1, 1);\n      pathname = pathnameParts.join('/') || '/';\n      return true;\n    }\n\n    return false;\n  });\n  return {\n    pathname: pathname,\n    detectedLocale: detectedLocale\n  };\n}","map":null,"metadata":{},"sourceType":"script"}