This repository has been archived on 2024-09-22. You can view files and clone it, but cannot push or open issues or pull requests.
zep/lib/isiOS.ts
Filipe Medeiros 830da94ec6 feat: wowza
2021-11-24 22:26:15 +00:00

19 lines
393 B
TypeScript

const isiOS = () => {
if ('userAgent' in navigator)
return [
'iPad Simulator',
'iPhone Simulator',
'iPod Simulator',
'iPad',
'iPhone',
'iPod',
].includes(navigator.userAgent)
else {
// not implemented yet, but put it here just for fun
// @ts-expect-error
return navigator.userAgentData.platform === 'iOS'
}
}
export default isiOS