misskey/src/client/scripts/is-device-touch.ts

2 lines
92 B
TypeScript

export const isDeviceTouch = 'maxTouchPoints' in navigator && navigator.maxTouchPoints > 0;