UNPKG

721 BSource Map (JSON)View Raw
1{"version":3,"file":"mobileDetector.js","sourceRoot":"../src/","sources":["mobileDetector.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,IAAM,KAAK,GAAG;IACnB,IAAI,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,SAAS,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,EAAE;QAC/D,OAAO,KAAK,CAAC;KACd;IACD,OAAO,mBAAmB,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;AAC9D,CAAC,CAAC","sourcesContent":["/**\n * Returns true if and only if the user is on a iOS device.\n * Used to determine whether iOS-specific behavior should be applied.\n */\nexport const isIOS = (): boolean => {\n if (!window || !window.navigator || !window.navigator.userAgent) {\n return false;\n }\n return /iPad|iPhone|iPod/i.test(window.navigator.userAgent);\n};\n"]}
\No newline at end of file