UNPKG

sanity

Version:

Sanity is a real-time content infrastructure with a scalable, hosted backend featuring a Graph Oriented Query Language (GROQ), asset pipelines and fast edge caches

13 lines (10 loc) 270 B
/** @internal */ export const supportsTouch = isTouchDevice() function isTouchDevice() { if (typeof window === 'undefined') return false return ( 'ontouchstart' in window || navigator.maxTouchPoints > 0 || (navigator as any).msMaxTouchPoints > 0 ) }