src/js/lib/detect.js (2 lines of code) (raw):

let isTouchscreenDevice = (('ontouchstart' in window) || (navigator.MaxTouchPoints > 0) || (navigator.msMaxTouchPoints > 0)); export {isTouchscreenDevice};