mirror of
https://github.com/ruisaraiva19/favycon.git
synced 2026-09-12 19:51:07 +05:00
* feat: upgrade dependencies * chore: update linter and CI workflows * chore: upgrade browserslist
14 lines
317 B
TypeScript
14 lines
317 B
TypeScript
export const isTouchCapable = () => {
|
|
if (typeof window === 'undefined') {
|
|
return false
|
|
}
|
|
return (
|
|
'ontouchstart' in window ||
|
|
// @ts-ignore
|
|
(window.DocumentTouch && document instanceof window.DocumentTouch) ||
|
|
navigator.maxTouchPoints > 0 ||
|
|
// @ts-ignore
|
|
window.navigator.msMaxTouchPoints > 0
|
|
)
|
|
}
|