All Downloads are FREE. Search and download functionalities are using the official Maven repository.
Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
package.dist.prod.util.detectNavigatorLanguage.js.map Maven / Gradle / Ivy
{
"version": 3,
"sources": ["../../../src/util/detectNavigatorLanguage.ts"],
"sourcesContent": ["import { DEFAULT_LANGUAGE } from \"../generated/AssetParameters.js\";\n\nconst isSSR = typeof document === \"undefined\";\n\nconst detectNavigatorLanguage = () => {\n\tif (isSSR) {\n\t\treturn DEFAULT_LANGUAGE;\n\t}\n\tconst browserLanguages = navigator.languages;\n\n\tconst navigatorLanguage = () => {\n\t\treturn navigator.language;\n\t};\n\n\tconst rawLocale = (browserLanguages && browserLanguages[0]) || navigatorLanguage();\n\n\treturn rawLocale || DEFAULT_LANGUAGE;\n};\n\nexport default detectNavigatorLanguage;\n"],
"mappings": "aAAA,OAAS,oBAAAA,MAAwB,kCAEjC,MAAMC,EAAQ,OAAO,SAAa,IAE5BC,EAA0B,IAAM,CACrC,GAAID,EACH,OAAOD,EAER,MAAMG,EAAmB,UAAU,UAE7BC,EAAoB,IAClB,UAAU,SAKlB,OAFmBD,GAAoBA,EAAiB,CAAC,GAAMC,EAAkB,GAE7DJ,CACrB,EAEA,eAAeE",
"names": ["DEFAULT_LANGUAGE", "isSSR", "detectNavigatorLanguage", "browserLanguages", "navigatorLanguage"]
}